Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RE: ShellExecute=>Run without windows command screen?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00902159
Message ID:
00902297
Vues:
14
You can use < pre > and < /pre > tags (w/o spaces) to preserve code formatting and make it more readable.

You can also find following links usefull:

- API_APPRUN in .VCX form File #9477
- ShellExecute API #12636

>
>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.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform