Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RE: ShellExecute=>Run without windows command screen?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
RE: ShellExecute=>Run without windows command screen?
Miscellaneous
Thread ID:
00902159
Message ID:
00902159
Views:
66
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
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Next
Reply
Map
View

Click here to load this message in the networking platform