>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