4D Pack v14

AP ShellExecute

Home

 
4D Pack v14
AP ShellExecute

AP ShellExecute 


 

AP ShellExecute ( fileName ; mode ; param ) -> Function result 
Parameter Type   Description
fileName  String in Name of file or document to be launched
mode  Longint in Status of window at time of launch
param  Text in Application parameters
Function result  Longint in 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, AP ShellExecute only works under Windows.

Note: This command only functions under Windows. Under Mac OS, it has no effect.

The 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:

  • if you pass 0, the window will be normal;
  • if you pass 1, the window will be full-screen;
  • if you pass 2, the window will be reduced and will appear in the Windows task bar.

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:

  `Under Windows
 $err:=AP ShellExecute("C:\Test.doc")

This example launches an internet browser, in full-screen mode by default, on the 4D site:

 $err:=AP ShellExecute("www.4d.fr";"1")

This example opens the 4D site in full-screen on Netscape® whatever the default internet browser:

 $err:=AP ShellExecute("C:\Program Files\Netscape\NETSCAPE.EXE";"1";"www.4d.fr")

This example opens the Windows Explorer in a normal window and displays the contents of the Music folder:

 $err:=AP ShellExecute("C:\WINDOWS\explorer.exe";0;"C:\Music")

 
PROPERTIES 

Product: 4D Pack
Theme: 4D_Pack : Utilities
Number: 61957

This command is deprecated and should not be used anymore

 
HISTORY 

Modified: 4D Pack v11

 
ARTICLE USAGE

4D Pack ( 4D Pack v11.4)
4D Pack ( 4D Pack v13.2)
4D Pack ( 4D Pack v12)
4D Pack ( 4D Pack v14 R2)
4D Pack ( 4D Pack v14)
4D Pack ( 4D Pack v14 R3)
4D Pack ( 4D Pack v14 R4)