ImageEn, unit iexWindowsFunctions

WindowsLaunchFile


Declaration

procedure WindowsLaunchFile(Handle: THandle; const Filename: string; Verb: TShellExecuteVerb = sevDefault);


Description

Calls ShellExecute to launch the specified file in the default application. Can also be used to launch a web page.
Can specify 0 for Handle.


Example

// Open a file in the default application
WindowsLaunchFile( Handle, IEFolderMView1.SelectedFilename );

// Display a web page
WindowsLaunchFile( Handle, 'http://www.ImageEn.com' );

// Display the properties dialog for a file
WindowsLaunchFileEx( Handle, IEFolderMView1.SelectedFilename, sevProperties );

// Open a file in the default application
WindowsLaunchFileEx( Handle, IEFolderMView1.SelectedFilename, sevOpen );

// Open a file in the default editor
WindowsLaunchFileEx( Handle, IEFolderMView1.SelectedFilename, sevEdit );

// Print a file
WindowsLaunchFileEx( Handle, IEFolderMView1.SelectedFilename, sevPrint );