How do I check to see if an application is runnning, if it is I just want to wait until it has completed.
Thanks
Printable View
How do I check to see if an application is runnning, if it is I just want to wait until it has completed.
Thanks
To see if an application is running by knowing it's exe, take a look at this thread.
Or you can use the FindWindow API function.
Code:Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Dim hWin As Long
hWin = FindWindow("SciCalc", "Calculator")
'FindWindow(class,caption)
If hWin <> 0 Then
Msgbox "Window found!", 64, hWin
Else
Msgbox "Window not found, 64, hWin
End If
End Sub
Thanks, I presume this is ok on NT?