hasselt
asked on
Is a programm running?
Does anyone can tell me if there is an API function that allows me to know if a program is currently running. The only data i will pass to the function is the application name (program name); I don't want to use the FindWindow API function cause it doesn't work as I expect?
If you have the answer please E-mail me at jarevalo@elektra.com.mx
If you have the answer please E-mail me at jarevalo@elektra.com.mx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What Windows version do you use? I run Windows 95.
Use App Object and PrevInstance
property.
Sub form_load()
Dim SaveTitle As String
On Error Resume Next
If App.PrevInstance Then
SaveTitle = App.Title
App.Title = "... duplicate instance."
Form1.Caption = "... duplicate instance."
AppActivate SaveTitle
End
End If
End sub
This will not allow another instance to start - if one is running
property.
Sub form_load()
Dim SaveTitle As String
On Error Resume Next
If App.PrevInstance Then
SaveTitle = App.Title
App.Title = "... duplicate instance."
Form1.Caption = "... duplicate instance."
AppActivate SaveTitle
End
End If
End sub
This will not allow another instance to start - if one is running
ASKER
“ Run time error 453 Can’t find DLL entry point CreateToolHelp32Snapshot in Kernel32. “
Can you please help me to solve it?