Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check whether application is already running or not

Status
Not open for further replies.

cknishad123

Programmer
Feb 17, 2002
9
IN
HI,

Is it possible for me to check whether an application (say a.exe) is running or not.
Is it possible to have a monitoring program b.exe which does this job.

Thanks in advance
 
Put follow coding somewhere in your app startup section:
Appln_handle = OpenChannel ( 'appln','Appln')
IF Appln_handle < 0 then
StartServerDDE('appln','Appln')
ELSE
MessageBox(&quot;Application Already Running .&quot;, &quot; You cannot start it again.&quot;)
CloseChannel(Appln_handle)
HALT CLOSE
END IF
Have a nice day Best regards
LiGang
U get , U given ..
 
HI,

Can you pls tell me what parameter should I give?
I have an executable named &quot;crew.exe&quot;, which appears as &quot;crew.exe&quot; in processes list, but no entry is coming in applications section in task manager.

Thanks in advance
Nishad
 
You need not to pass the parameter , just implement the code I gave to you :) Best regards
LiGang
U get , U given ..
 

You can't call StartServerDDE and other DDE functions in an application object's events. So copy this code in your Main windows open event , define Appln_handle as global variable(long). Then only this code will work???
Happy programming
Kuttipulikal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top