|
|
|
|
- Using a command line
- Using the DDEActive constant
- Miscellaneous
DDEStart (Function) In french: DDELance
Warning
From version 27, this function is kept for backward compatibility. It is recommended to use ExeRun.
Starts the execution of a program (an executable for example) from the current application. // Start Notepad in default mode DDEStart("NOTEPAD.EXE Readme.txt")
Syntax
<Result> = DDEStart(<Program name> [, <Mode> [, <Wait> [, <Working directory>]]])
<Result>: Boolean - True if the program was started,
- False otherwise.
<Program name>: Character string Name of program to start with its path and/or the parameters that must be passed to the program (if necessary). If no path is specified, the program is sought in the current directory first, then in the directory of Windows and in the directories accessible by PATH. If the executable corresponds to a long name with space characters, you must use the following syntax: <Program name> = " " " Long_name_with_spaces" " Command_line" <Mode>: Optional integer constant Mode for starting the program (no action on the DOS programs): | | DDEActive (Default value) | The program run is active: it is run by "taking control" over the current program | DDEIconize | The program run is inactive: it is run minimized | DDEInactive | The program run is inactive: it is run while the current program keeps focus | DDEMaximize | The program run is active: It is run by "taking control" over the current program (the execution window has the maximum size allowed) | exeNoHandleInheritance | Indicates that the program should not inherit handles from the parent (applies to ALL handles, including files). The program is independent of the application that launched it. This constant can be combined with other constants to define how the program is launched. |
<Wait>: Optional boolean Amount of time before resuming the execution of the current program:- True: the current program resumes its execution when the program run is over.
- False (default value): the current program and the launched program run in parallel.
<Working directory>: Optional character string Working directory of the application to be started. Remarks To pass parameters in command line to the executable run, you must specify the name and full path of the executable to run. If the program run was developed with WINDEV/WEBDEV, CommandLine allows you to retrieve the command line. Using the DDEActive constant If the process where the application is run (with the DDEActive constant) runs a code allowing the calling program to regain focus, the called program loses control. In order for the called program to keep focus, you must avoid: - calling another window or dialog box after the call to DDEStart,
- that the button (if any) whose process contains a call to DDEStart is set as "Tab stop" ("Accessible by TAB" option),
- calling SetFocusAndReturnToUserInput after DDEStart.
- DDEStart does not modify the current directory. The current directory before running DDEStart is identical to the current directory after running DDEStart.
- If the program run does not take into account the specified runtime mode, the program is run by default in DDEActive mode.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|