IWinApplicationClass.ShellExecute

Syntax

ShellExecute(Info: IWinShellExecuteInfo);

Parameters

Info. Information about file (application) to be started.

Description

The ShellExecute method opens the file or application, information on which is passed in the Info parameter.

Comments

If the error message appears on opening the file or application, the exception is thrown for the ShellExecute method.

Example

Executing the example requires the file C:\Doc\Catalog.xls.

Sub UserProc;
Var
    Info: IWinShellExecuteInfo;
Begin
    Info := New WinShellExecuteInfo.Create;
    Info.Directory := "C:\Doc";
    Info.File := "Catalog.xls";
    WinApplication.ShellExecute(Info);
End Sub UserProc;

On executing the example the specified file is opened with the application assigned for this in operating system.

See also:

IWinApplicationClass