Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use ShellExecute to run a DOS progarm ?
Message
From
24/04/2013 01:04:18
 
 
To
24/04/2013 00:58:38
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01571708
Message ID:
01571709
Views:
78
>Hi,
>I want to use ShellExecute to run a DOS (xHarbour) program in VFP9,
>how to code it and how to suppress the black DOS prompt ?
>
>Please advise.
>Thanks.
>
>Derek

This is my simple ShellX function. tcURL is the fullpath to the program or file I want top run/open.
Lparameters tcURL

#define SW_HIDE 0
#DEFINE SW_SHOWNORMAL 1
#DEFINE SW_SHOWMINIMIZED 2
#DEFINE SW_SHOWMAXIMIZED 3

*!*   Legal verbs: open, edit, print, find, explore, NULL

DECLARE INTEGER ShellExecute IN shell32.dll ; 
   INTEGER hndWin, STRING cAction, STRING cFileName, ; 
   STRING cParams, STRING cDir, INTEGER nShowWin
ShellExecute( 0, "open", tcURL, "", "", SW_SHOWNORMAL )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform