PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Parameters passed to the window to open
  • Opening mode of window
  • Number of opened windows
  • Closing a window
  • Minimized window
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Opens and enables an MDI child window.
MDIOpen is also used to:
  • define the alias of the window,
  • define the title of the window to open,
  • pass parameters to the window.
During the call to MDIOpen, the following processes are run:
  • Running the "Global declarations" process of window.
  • Running the initialization codes of the controls (the order is undefined).
  • Displaying the window (this window is always a child window of the MDI parent window). This window cannot be moved outside the MDI area of the MDI parent window.
Note: MDIOpen only opens the windows defined as "MDI child windows" in the window editor. A MDI child window can be opened only if the MDI parent window exists and if it is opened.
Example
// Open the "WIN_CustomerInput" window
// The title of the window is "New customer"
// The Value1 and Value2 parameters are passed to the process
// for declaring the global variables of "WIN_CustomerInput"
ResAlias = MDIOpen(WIN_CustomerInput, "Alias New Customer", ...
"New Customer", Value1, Value2)
Syntax
<Result> = MDIOpen(<Window Name> [, <Alias Name> [, <Window Title> [, <Parameter 1> [, <Parameter 2> [...]]]]])
<Result>: Character string
Alias generated for the window to open. The same window can be opened several times. This alias is used to identify the opened window. This alias can be modified by WinChangeAlias.
<Window Name>: Character string (with or without quotes)
  • Name of window to open.
  • Name and full path of the window (".WDW" file) to open.
<Alias Name>: Character string (with quotes)
Name of window alias. An alias is automatically generated ("A0001" for example) if this parameter is not specified or if it corresponds to an empty string ("").
<Window Title>: Character string (with quotes)
Title of window to open. If this parameter is not specified or if it corresponds to an empty string (""), the window title is the one defined in the editor.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will be passed to the "Declaration of global variables" process of window to open. This parameter is passed by value and it is considered as being a global variable of the window.
This parameter cannot contain any array variables (the arrays can only be passed by address).
<Parameter 2>: Type of value sent to the window (optional)
Second parameter that will be passed to the "Declaration of global variables" process of window to open. This parameter is passed by value and it is considered as being a global variable of the window.
This parameter cannot contain any array variables (the arrays can only be passed by address).
Remarks

Parameters passed to the window to open

The parameters are retrieved in the "Declaration of global variables" process of window. To do so, specify the following code line at the beginning of the process:
PROCEDURE <Window Name> (<Parameter 1> [,<Parameter 2> [, ...]])
These parameters are passed by value and not by address.

Opening mode of window

The window is opened in non-modal mode:
  • The MDI parent window remains the current window.
  • Once the MDI child window is opened, the processes following the call to MDIOpen are run.
  • The user will be able to click in the parent window of the opened window.

Number of opened windows

The number of windows that can be opened simultaneously depends on the available memory.

Closing a window

A window opened by MDIOpen can be closed by Close (without parameter) from any process:
  • of the window,
  • of a window control.
If an MDI parent window is closed, its MDI child windows are also closed.

Minimized window

If the MDI child window is minimized, only this window is minimized.
The displayed icon is:
  • the one of the minimized window if the current window has an icon,
  • the one of the current project if the current window has no icon.
Related Examples:
WD Multi-Windowing Training (WINDEV): WD Multi-Windowing
[ + ] This example presents the basic concepts for managing the multi-windowing and the dynamic tabs with WINDEV.

This example includes a simple interface for managing the customer forms:
- multi-windowing with MDI interface,
- multi tabs with a dynamic tab control.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment