RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomFileRun.ExecuteTarget Method

Performs the specified operation on a target file.

Pascal
procedure ExecuteTarget(Target: TObject); override;
C++
virtual __fastcall ExecuteTarget(TObject * Target);

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action). 

Target is the currently active object when the action fires. 

ExecuteTarget ignores the Target parameter and performs the operation specified by the Operation property on the target file specified by the FileName property or chosen by the user if the value of the Browse property is true. The values of Parameters, ShowCmd, and Directory, as well as the window handle for ParentControl are passed to Windows with the request to perform the specified operation.

Note: If the attempt to perform the operation fails, the HInst property contains an error code that indicates what was wrong. If the attempt succeeds, the HInst property is greater than 32.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!