Hi,
This is a sample program inplementing Shellexecute from Mastering Visual Foxpro by one of our Contributor here.
I've change a very little code in it...
You can try to play around with this, you can run batch file or dos executables files without any screen..
Note: I have tested only once and my pc monitor will flicker (no display, like when your updating a VGA driver under Windows XP..)
The code is below..
cRunExt("\kick.exe") && Substitute the "\kick.exe" with the external exe or
Function cRunExt && batch file you want to run...
LPARAMETERS tcFile
tcfile=IIF(type("tcFile")="C",tcFile,;
"kick.exe")
DECLARE INTEGER ShellExecute ;
IN SHELL32.dll ;
INTEGER nWinhandle,;
STRING cOperation,;
STRING cFilename,;
STRING cParameters,;
String cDirectory,;
INTEGER nShowWindow
DECLARE INTEGER FindWindow ;
IN WIN32API ;
STRING cNull,STRING cWinName
RETURN ShellExecute(FindWindow(0,""),;
"Open",tcFile,;
"","","",0)
I used the other modified code in zipping & unzipping with Winzip in Data Backup & Restore on my programs..
Hope you find it useful and you can modified in a better way..
Best Regards.
Jojo R. dela Cuesta
Dalplus Technologies
http://www.dalplus.com