Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute Question
Message
From
04/08/2001 14:14:31
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00539706
Message ID:
00539809
Views:
19
>I suggest you use the _shellexecute class in the FFC _environ.vcx claslib that is included with VFP6, it supports this and also parameters. FOr vfp6.exe, you would probably pass the PRG/APP/EXE file name and not a statement like DO filename.
>
>Ken
>
>>I have:
>>
>>cAppName = "d:\program files\microsoft\visual studio\vfp98\vfp6.exe"
>>
>>DECLARE INTEGER ShellExecute IN SHELL32 ;
>>INTEGER, STRING, STRING, STRING, STRING, INTEGER
>>
>>=ShellExecute(hWnd, 'open', cAppName, '', '', 5)
>>
>>
>>How do I pass a command to VFP, such as 'DO SomeProgram'?
>>
>>Thanks

Do this instead:
cApp='d:\foldername\prgname.prg'

Then run Shellexecute(). This will automatically cause Windows to run the cApp using VFP as long as '.prg' is a registered VFP extension.
ramil
~~ learning to stand still
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform