[RESOLVED] check if an app is running
is it possible to check if an exe is running. As i would like my program not run with out the other one.
the code i am thinkin off:
Code:
If project1.exe is running then
else
unload me
End If
what code replaces 'project1.exe is running'
thanks in advance chris1990
Re: check if an app is running
Is the other program also yours?
Re: check if an app is running
yes for example project2.exe
Re: check if an app is running
Okay then the easiest thing to do is to put an "I'm running" flag in the registry someplace when the 2nd program starts and turn it off when it ends. One way to update the registry is via GetSetting and SaveSetting. See my signature for an example.
Re: check if an app is running
thanks this will do i was wodering if there is a code for it as there's a code for terminating them.
Re: [RESOLVED] check if an app is running
In program two just do something like this.
vb Code:
Private Sub Form_Load()
SaveSetting App.EXEName, "Stuff", "Running", True
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveSetting App.EXEName, "Stuff", "Running", False
End Sub
and in program 1
vb Code:
Dim bIsExe2Running As Boolean
bIsExe2Running = GetSetting("<app 2 exe name>", "Suff", "Running", False)