ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Window functions
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Opens a modal WINDEV window.
<Window>.Open is also used to:
  • set the window position,
  • pass parameters to the window.
When <Window>.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 (the order is undefined),
  • 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.
Remark: The controls in the previous window are disabled.
Mobile platforms:
  • iOS and UWP: <Window>.Open is not available. Use <Window>.OpenMobileWindow instead.
  • Android: Using <Window>.Open in Android is not recommended. We recommend that you use <Window>.OpenMobileWindow. If it is necessary to process the value returned by the window, use the "Close a child window" event of the calling window.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV site, this function has the same behavior as <Page>.DisplayDialog.
Example
// Open and reposition the "WIN_Edit" window
// The Value1 and Value2 parameters are passed to the event
// "Global declarations" of "WIN_Edit"
// ReturnedValue will retrieve the returned value
// when the "WIN_Edit" window is closed
ReturnedValue = WIN_Edit.Open(Value1, Value2)
Syntax
<Result> = <Window>.Open([<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>: Window name
Name of the window to be opened.
By default, the window is displayed according to the position defined in the editor.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will 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 that must 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.
Remarks

Parameters passed to the window to open

The parameters are retrieved in the "Global declarations" event of the window. Simply write the following line of code at the start of the event:
PROCEDURE <Window name>(<Parameter1> [, <Parameter2> [, ...]])

For more details, see Window with parameters.

Window opening mode

The window is opened in modal mode:
  • the result of <Window>.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.
To manage modeless windows, use <Page>.OpenChild or OpenSister.
To manage MDI, use <Window>.MDIOpen.

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 <Window>.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.
To change the window title, use NextTitle or CurrentTitle.
Windows

Minimized window

If the current window is minimized, the entire project is minimized.
The displayed icon is:
  • the one of the current window if the current window has an icon,
  • the one of the current project if the current window has no icon.

Opening the window of a component

To open the window of a component, simply use the name of the component window (component included in the project). For example:
ComponentWindow.Open()
If a conflict occurs with a project element, the name of the element must be prefixed by the name of the component. For example:
MyComponent.Window.Open()
To use the name of the window in a variable, specify the name of the component. For example:
sWindow is string = "MyComponent.MyWindow"
sWindow.Open()
Component: wd290obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help