RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomFileRun Class

TCustomFileRun is the base class for actions that perform a specified operation on a file.

Pascal
TCustomFileRun = class(TCustomAction);
C++
class TCustomFileRun : public TCustomAction;

ExtActns

Use TCustomFileRun as a base class when defining a pre-defined action that uses ShellExecute to perform an operation on a file. TCustomFileRun implements properties for specifying 

A target file or the option of letting the user select one using a browse dialog. 

The operation to perform on the target file. 

Parameters to supply to an external application that performs the desired operation. 

The startup directory for the external application. 

The state of the window that appears when performing the specified operation. 

When the ExecuteTarget method is called, TCustomFileRun uses these properties to call the Windows API ShellExecute, which performs the specified operation if it is listed as applicable to the target file type in the system registry. Depending on the operation, this may involve launching an external application, calling a dynamic-link library (DLL), or displaying a system dialog (such as the file properties dialog). 

Do not add TCustomFileRun to an action list or action manager. To add a generic file run action, use TFileRun instead. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!