Shell Execute Foundation Class

Category System utility
Default Catalog Visual FoxPro Catalog\Foundation Classes\Utilities
Class _shellexecute
Class Library _environ.vcx
Parent Class _custom
Sample ...\Samples\Solution\Ffc\Buttons.scx

Remarks

This class enables you to launch an application or document with its associated application from the current application.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class on the form. You can then specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

Properties, Events, Methods Description
ShellExecute method Attempts to run the file tcFileName in the
directory, tcWorkDir.
Syntax: ShellExecute(tcFileName,
tcWorkDir, tcOperation)
Return:nSuccess
Arguments:
tcFileName specifies the file to run.
tcWorkDir specifies the path to the file to
run.
tcOperation specifies the operation to
perform.
nSuccess specifies the failure or the
success of the run attempt using one of
the following values.

2 = Bad Association (for example, invalid URL)
29 = Failure to load application
30 = Application is busy
31 = No application association

Values over 32 represent success, and
return an instance handle for the running
application.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Class Samples