4D Pack v15 R2_o_AP ShellExecute |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Pack v15 R2
_o_AP ShellExecute
|
_o_AP ShellExecute ( fileName ; mode ; param ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
fileName | String |
![]() |
Name of file or document to be launched | |||||
mode | Longint |
![]() |
Status of window at time of launch | |||||
param | Text |
![]() |
Application parameters | |||||
Function result | Longint |
![]() |
0, if the command execution succeeded; otherwise, a system error | |||||
Compatibility Note: This command is now obsolete; it is kept only for compatibility reasons and will be removed in future versions of the plug-in. It is strongly recommended to use the LAUNCH EXTERNAL PROCESS command of 4D. Note that starting with version 11.0 of 4D, _o_AP ShellExecute only works under Windows.
Note: This command only functions under Windows. Under Mac OS, it has no effect.
The _o_AP ShellExecute command enables you to launch an application or open a document from a 4D database.
In the fileName parameter, pass the name or complete (absolute) access path of the file to be launched. When the application or document to be opened is located next to the database structure, it is possible to pass only the file name or a relative access path.
Simply indicate a document name and Windows handles the execution of the associated application.
The mode parameter enables you to specify the display mode of the window in which the application will be launched:
The param parameter enables you to pass any additional type of parameter that may be necessary for the launched application. For instance, if you use this command to launch a Web browser, you can pass a specific URL in this parameter.
This example opens a Word® document located at the root of the main disk:
`On Windows
$err:=_o_AP ShellExecute("C:\Test.doc")
This example launches an internet browser, in full-screen mode by default, on the 4D site:
$err:=_o_AP ShellExecute("www.4d.com";"1")
This example opens the 4D site in full-screen on Netscape® whatever the default internet browser:
$err:=_o_AP ShellExecute("C:\Program Files\Netscape\NETSCAPE.EXE";"1";"www.4d.com")
This example opens the Windows Explorer in a normal window and displays the contents of the Music folder:
$err:=_o_AP ShellExecute("C:\WINDOWS\explorer.exe";0;"C:\Music")
Product: 4D Pack
Theme: 4D_Pack : Utilities
Number:
61957
Modified: 4D Pack v11
4D Pack ( 4D Pack v15 R2)
4D Pack ( 4D Pack v15.1)
4D Pack ( 4D Pack v15)