What am I doing wrong ? (Win32 API - GetActiveWindow) 
Author Message
 What am I doing wrong ? (Win32 API - GetActiveWindow)

I wrote a VB 5 app that calls a DOS Shell app.  I tried using the following
code to get the handle of that shelled app and continually test to see if
that app was still running by checking for that handle.  Once the handle
was gone, then I knew the app had closed.  Can you see the error of my
ways?

'Declare GetActiveWindow and IsWindow API's in module (Obviously)

Dim X
Dim hwndShell

X = Shell("Some DOS App Path")
hwndShell = GetActiveWindow()
While IsWindow(hwndShell)
        X = DoEvents()
Wend
MsgBox "App is closed."

I know this basic logic worked at some point, but I changed things around
and I have never gotten it to work since.  Any help you can give would be
most appreciated !!!!




Sat, 06 Nov 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. What am I doing wrong ? (Win32 API - GetActiveWindow)

2. What am I doing wrong ? (Win32 API - GetActiveWindow)

3. Recordset: What am I doing wrong?

4. What am I doing wrong??

5. What am I doing wrong?

6. Help with syntax. What am I doing wrong

7. What am I doing wrong?

8. What am I doing wrong?

9. What am I doing wrong?

10. Please tell me what I am doing wrong - DAO parameter Append Query :(

11. What am I doing wrong? -MultiSelect List box

12. Select Case - What am I doing wrong?

 

 
Powered by phpBB® Forum Software