Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening other applications
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00967323
Message ID:
00967330
Views:
19
Well, Mike already covered API part :) I'll add more:
sh = CreateObject("WScript.Shell")

* note both double and single quotes around the path
* 3 means maximized window
* .F. means do not wait when the appication returns
sh.Run('"C:\Program Files\Microsoft Visual FoxPro 8\vfp8.exe"',;
	3, .F.)
Rarely this approach (Windows Scripting) may not work because of stricter security policy. Then you may use WinExec API function:
#DEFINE SW_SHOWNORMAL       1
#DEFINE SW_SHOWMINIMIZED    2
#DEFINE SW_SHOWMAXIMIZED    3

DECLARE INTEGER WinExec IN kernel32;
	STRING  lpCmdLine, INTEGER nCmdShow

= WinExec(lpCmdLine, SW_SHOWMAXIMIZED)
Previous
Reply
Map
View

Click here to load this message in the networking platform