Parameters passed to the window to open Window opening mode Number of opened windows Closing a window Title of the window to be opened Minimized window Opening the window of a component
Open (Function)
In french: Ouvre
Opens a modal WINDEV window.
When Open is called, the following events and actions are executed:
the "Global declarations" event of the window, the "Initialization" events of the controls in the window (in any order), the window "Initialization" event, the window is displayed (it becomes the current window). For more details on the events associated with a window, see
Events associated with a window .
Remarks :
The controls in the previous window are disabled. Open can also be used to define the position and pass parameters to the window.In standard syntax, these parameters are passed directly. Mobile platforms :
iOS : Open is not available. Use OpenMobileWindow instead.Android : Open is not recommended. We recommend that you use OpenMobileWindow . If it is necessary to process the value returned by the window, use the "Close a child window" event of the calling window.
ReturnedValue = Open ( "EditWindow, 10, 15" , Value1 , Value2 )
x , y are int
x = MouseXPos ( mpScreen )
y = MouseYPos ( mpScreen )
Open ( StringBuild ( "WIN_Popup,%1,%2" , y , x ) )
New in SaaS
My_Exe_Window is Window WIN_Main
My_Exe_Window . OpeningOptions . X = 50
My_Exe_Window . OpeningOptions . Y = 100
My_Exe_Window . OpeningOptions . Animation = waRotationX + waMorphCylinder
Open ( My_Exe_Window )
Syntax
Opening a modal window (standard syntax) Hide the details
<Result> = Open(<Window name> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Type corresponding to the retrieved value (optional)
Value returned by the popup window when it is closed. This value is returned:by the RETURN keyword in the window "Close" event, by the Close function, by the ReturnedValue property used before closing the window. <Window name>: String or window name
Corresponds to: the name of the window to be opened. the name and full path of the window (".WDW" file) to be opened. By default, the window is displayed according to the position defined in the editor. You can define the display position of the window. The window name is completed by the window display coordinates when opened. This parameter has the following format:
"<Window name>, <Y>, <X>"
where:
<Window name>: Name (or name and full path) of the window to be opened. <Y>: Y-coordinate of the window (in pixels), relative to the upper-left corner of the screen or parent window. <X>: X-coordinate of the window (in pixels), relative to the upper-left corner of the screen or parent window. Note: The coordinates are ignored if the window is defined as centered in the editor.
<Parameter 1>: Type of value sent to the window (optional)
First parameter to be passed to the "Global declarations" event of the window to open. This parameter is passed by reference and is considered as a variable global to the window. <Parameter N>: Type of value sent to the window (optional)
Nth parameter to be passed to the "Global declarations" event of the window to open. This parameter is passed by reference and is considered as a variable global to the window. New in SaaS Remarks
Parameters passed to the window to open
The parameters are retrieved in the "Global declarations" event associated with the window. The first line of code of this event must correspond to the following line:
PROCEDURE <Window> (<Parameter 1> [, ... [, <Parameter N>]])
where:
<Window > must correspond to the name of the window. <Parameter N> must correspond to the parameters expected. Note: These parameters are passed by value, not by reference. For more details, see
Window with parameters .
Window opening mode
The window is opened in modal mode:
the result of Open will be known once the window is closed, the user will not be able to click in one of the parent windows of the current 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 with
Open can be closed with
Close (without parameters) from any event associated with the window or a control in the window.
If a parent window is closed, its child windows are also closed.
Title of the window to be opened
By default, the window title is the one defined in the editor (in the "General" tab of the description window).
To change the window title:
Business / UI classification: UI Code
This page is also available for…