GetActivewindow returns zero handle 
Author Message
 GetActivewindow returns zero handle

GetActiveWindow only works within the context of the calling thread's
message queue. Otherwise, the return value is null as you've seen. Use
GetForegroundWindow instead.

--

Randy Birch, MVP Visual Basic

http://www.*-*-*.com/
http://www.*-*-*.com/

Please correspond only using the newsgroups so all can benefit.


| I'm trying to capture the current active window handle (and then get its
| name) from Vb, running in the background (in the system tray).
|
| However, GetActivewindow gives me a zero handle when other apps have
focus.
|
| Any ideas gratefully received.
|
| Dermot Balson
|
|
|



Fri, 08 Mar 2002 03:00:00 GMT  
 GetActivewindow returns zero handle
I'm trying to capture the current active window handle (and then get its
name) from Vb, running in the background (in the system tray).

However, GetActivewindow gives me a zero handle when other apps have focus.

Any ideas gratefully received.

Dermot Balson



Sat, 09 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Replace Function returns Nothing instead of Zero-length string

2. CreateProcess returning a value of zero

3. Microsoft Outlook Express 5 and Netscape, the AttachmentCount property always returns zero

4. Mid returning Zero Length String - sort of

5. Text field in Excel returns null when led by a zero

6. Oracle Returns Zero (0) USing ADO

7. Jet OleDB: Allow zero Length property returns True

8. -Text field in Excel returns null when led by a zero

9. Text field in Excel returns null when led by a zero

10. ADO calculations returning zero

11. GetDC Returns Zero

12. GetComputerName returns zero length string

 

 
Powered by phpBB® Forum Software