Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Start .EXE within a FoxPro program.
Message
From
30/11/2004 13:18:13
 
 
To
30/11/2004 13:13:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00965782
Message ID:
00965784
Views:
8
>I think that I have seen something on this, but is there a way to execute and .EXE program within a FoxPro program. on all Foxpro 6,7 and 8.0 version with Win2000, XP windows?

Do you mean run an external profgram?

You can do it in on eof severalways:

Old one (shell to DOS):
RUN /N notepad.exe

WSH:
#define SW_SHOW_NORMAL 1
#define SW_SHOW_MINIMIZED 2
#define SW_SHOW_MAXIMIZED 3
oShell = createobject("WScript.Shell")
oShell.Run("notepad.exe",SW_SHOW_NORMAL,.T.)


Windows API:
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
ShellExecute(0, "Open", "notepad.exe", "", "", 1)

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform