Link to home
Start Free TrialLog in
Avatar of hasselt
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
ASKER CERTIFIED SOLUTION
Avatar of deighton
deighton
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hasselt
hasselt

ASKER

I have problems with the API functions: The problem is that the program doesn’t recognize them so the system sends the following error:
“ Run time error 453 Can’t find DLL entry point CreateToolHelp32Snapshot in Kernel32. “
Can you please help me to solve it?

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