ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / DDE functions
  • Using a command line
  • Using the DDEActive constant
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 27, this function is kept for backward compatibility. It is recommended to use ExeRun.
Executes a program (an executable file, for example) from the current application.
Example
// Lancement du bloc-notes avec le mode par défaut
DDEStart("NOTEPAD.EXE Lisezmoi.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
Program start mode (no action on DOS programs):
DDEActive
(Default value)
The launched program is active: it runs and "takes over" the current program
DDEIconizeThe launched program is inactive: it runs reduced to an Icon
DDEInactiveThe launched program is inactive: it runs while the current program maintains focus
DDEMaximizeThe launched program is active: it runs by "taking over" the current program (the execution window has the maximum authorized size)
exeNoHandleInheritanceIndicates 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.

Java This parameter is ignored. The program run is active, it "takes control" over the current program.
<Wait>: Optional boolean
Amount of time before resuming the execution of the current program:
  • True: the current program resumes execution when the launched program is completed.
  • False (default): the current program and the launched program run in parallel.
<Working directory>: Optional character string
Working directory of the application to be started.
Remarks

Using a command line

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.

Miscellaneous

  • 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.
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help