Verb: String;
The Verb property determines the command that must be used when opening an application or document specified in the File property.
The list of commands supported by the certain types of files is available in the operating system registry. Each command uses the subsection located in the following registry branch: HKEY_CLASSES_ROOT\<File type>+file\Shell (for example, HKEY_CLASSES_ROOT\txtfile\shell - contains a list of commands supported by text files).
Executing the example requires the c:\Report.txt text file.
Sub UserProc;
Var
Info: IWinShellExecuteInfo;
Begin
Info := New WinShellExecuteInfo.Create;
Info.File := "c:\Report.txt";
Info.Verb := "Print";
WinApplication.ShellExecute(Info);
End Sub UserProc;
After executing the example the specified file is printed.
Executing the example requires the c:\Report.txt text file.
Imports Prognoz.Platform.Interop.Ui;
Sub UserProc();
Var
Info: WinShellExecuteInfo;
WinAppCls: WinApplicationClassClass = New WinApplicationClassClass();
Begin
Info := New WinShellExecuteInfoClass();
Info.File := "c:\Report.txt";
Info.Verb := "Print";
WinAppCls.ShellExecute(Info);
End Sub;
After executing the example the specified file is printed.
See also: