Hello,
This is wath i want to do.
Check if a application is running if it does then close it.
I know how to check on running apps:
FindWindow is the title bar of the window
SET LIBRARY TO CFYPATH + "\exe\foxtools.fll" ADDITIVE
lGetwind = regfn("FindWindow","CC","I"
lWclass=0
lHandle=callfn(lGetwind,lWclass,lWindowTitle)
IF lHandle <> 0
ON KEY LABEL ESCAPE *
SET ESCAPE OFF
WAIT WINDOW "THIS PROGRAM IS ALREADY RUNNING !" NOWAIT
QUIT
ENDIF
SET LIBRARY TO
But how can i close the running app ?
The app isn't foxpro but a own written vb app.
The things i found on the internet where for VFPW and not for FoxPro 2.6A
This is a commend rgbean shared with me but i don't know how to realize this:
If you are running under a 32-bit OS (Win 9,x, NT/2000/XP), the problem is that many of the API calls aren't directly available through FOXTOOLS. You'll may need to use CALL32 - available at Then use the API SendMessage() with the "close" option. (Close is where the 2nd parameter has a value of 16.)
If someone could PLEASE help me.
Already thanx alot
This is wath i want to do.
Check if a application is running if it does then close it.
I know how to check on running apps:
FindWindow is the title bar of the window
SET LIBRARY TO CFYPATH + "\exe\foxtools.fll" ADDITIVE
lGetwind = regfn("FindWindow","CC","I"
lWclass=0
lHandle=callfn(lGetwind,lWclass,lWindowTitle)
IF lHandle <> 0
ON KEY LABEL ESCAPE *
SET ESCAPE OFF
WAIT WINDOW "THIS PROGRAM IS ALREADY RUNNING !" NOWAIT
QUIT
ENDIF
SET LIBRARY TO
But how can i close the running app ?
The app isn't foxpro but a own written vb app.
The things i found on the internet where for VFPW and not for FoxPro 2.6A
This is a commend rgbean shared with me but i don't know how to realize this:
If you are running under a 32-bit OS (Win 9,x, NT/2000/XP), the problem is that many of the API calls aren't directly available through FOXTOOLS. You'll may need to use CALL32 - available at Then use the API SendMessage() with the "close" option. (Close is where the 2nd parameter has a value of 16.)
If someone could PLEASE help me.
Already thanx alot