RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomFileRun.Operation Property

Indicates what TCustomFileRun should do with the target file.

Pascal
property Operation: String;
C++
__property AnsiString Operation;

Set Operation to indicate what should be done with the target file when TCustomFileRun fires. The possible values for Operation depend on the particular file or folder specified by FileName or selected by the user when Browse is true. The possible operations for a particular file or folder are listed in the system Registry

The following strings are usually valid:

Value 
Meaning 
edit  
TCustomFileRun opens an editor. If FileName is not an editable file, the action fails.  
explore  
TCustomFileRun launches the Windows explorer for the folder specified by FileName.  
open  
TCustomFileRun opens the file specified by FileName. FileName can be an executable file, a file associated with an application that can open it, or a folder.  
print  
TCustomFileRun prints the file specified by FileName. If FileName is a binary file (for example, if it is an executable), the action fails.  
properties  
TCustomFileRun displays the file or folder's properties in a Properties dialog.  

Note: If Operation is an empty string, Windows tries to use the "open" operation. If the specified file does not support the "open" operation, Windows tries to use the default operation. If there is no "open" operation and no default operation, and if the application is running on Windows 2000 or later, Windows uses the first verb listed in the Registry.
 

 

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