
How I detect if neede application is running?
I just recently used a win32 API called FindWindow to detect if an
application has stopped running. You could use the same but to find when an
application starts. You can modify this code if you wish
*** Code to check if RSLINX has been started***
Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal
lpsz2 As String) As Long
Public Function Check_App_Open()
Dim APP_NAME As String
APP_NAME = "RSLINX"
If FindWindowEx(0, 0, vbNullString, APP_NAME) Then
msgbox APP_NAME & " has started" End If
End Function
Hope this helps!!
David
Quote:
>Lets' say I need to detect when some app starts
>i e if Solitaire starts I wanna be noticed about it in a msgbox!
>Thanks
>Diman