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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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.
Java In Java, modal windows appear in the taskbar.
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.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV website, this function has the same behavior as PageDisplayDialog.
Example
// Open and reposition the "EditWindow" window
// The Value1 and Value2 parameters are passed to the "EditWindow" window
// ReturnedValue will retrieve the value returned when "EditWindow" is closed
ReturnedValue = Open("EditWindow, 10, 15", Value1, Value2)
// Open a window at given position by using variables
x, y are int
x = MouseXPos(mpScreen)
y = MouseYPos(mpScreen)
Open(StringBuild("WIN_Popup,%1,%2", y, x))
New in SaaS
// Set window opening options
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 window
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
Java This syntax is only available for Java applications

Opening a modal window (with a Window variable) Hide the details

<Result> = Open(<Window> [, <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 variable
Name of the Window variable corresponding to the window to be opened.
  • The window opening options must have been defined using the OpeningOptions property.
  • The value of the parameters expected by the window must have been defined using the OpeningParameters property.
<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.
Note: Parameter values can also be defined using the OpeningParameters property, which can be used in conjunction with a variable of type 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.
Note: Parameter values can also be defined using the OpeningParameters property, which can be used in conjunction with a variable of type Window.
Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 4.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
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.
To manage modeless windows, use OpenChild or OpenSister.
To manage MDI, use 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 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:
WINDEVReports and QueriesWindowsJavaUser code (UMC)

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.
WINDEVReports and QueriesWindowsUser code (UMC)

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:
Open(ComponentWindow)
If a conflict occurs with a project element, the name of the element must be prefixed by the name of the component. For example:
Open(MyComponent.Window)
To use the name of the window in a variable, specify the name of the component. For example:
sWindow is string = "MyComponent.MyWindow"
Open(sWindow)
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video Parametro Open
https://youtu.be/3yWfMrG50_g

https://windevdesenvolvimento.blogspot.com/2019/06/dicas-2147-windev-webdev-mobile.html
===========================
// btn_calcula
//EDT_VALOR_RESULTADO=EDT_VALOR_1+EDT_VALOR_2+EDT_VALOR_3+EDT_VALOR_4+EDT_VALOR_5
sNOME_CAMPO is string=""
FOR nCONTADOR=1 TO 5
sNOME_CAMPO="EDT_VALOR_"+nCONTADOR
EDT_VALOR_RESULTADO+={sNOME_CAMPO}
END
TEXTO is string="FOI FEITO SOMAS"
Close(WIN_COMANDOS3,EDT_VALOR_RESULTADO,TEXTO)
===========================
// BTN_aBRE_CALCULADORA
(EDT_valor_resultado,EDT_RESULTADO)=Open(WIN_COMANDOS3,EDT_valor_A,EDT_valor_b)
=========================
amarildo
08 Jun. 2019
I WILL TEACH HOW TO CALL A BUSINESS REGISTRATION
Aula 1156 WinDev Curso ErpAmarildo 14 - MENU - CHAMAR EMPRESA

Nessa aula de hoje
VOU ENSINAR COMO CHAMAR UM CADASTRO DE EMPRESA
DE UMA EXE, PARA UMA WDL

In this class today
I WILL TEACH HOW TO CALL A BUSINESS REGISTRATION
FROM AN EXE, TO A WDL

En esta clase de hoy
VOY ENSEÑAR COMO LLAMAR UN REGISTRO DE EMPRESA
DE UNA EXE, PARA UNA WDL

//--------------------

EXTERN WIN_Table_empresa
LoadWDL("cadastros.wdl")
Open(WIN_Table_empresa)

//---------------------

Blog com Video e Exemplo

https://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2403-video-aulas-amarildo-aula-1156-windev-curso-erpamarildo/read.awp

http://windevdesenvolvimento.blogspot.com.br/2017/05/aula-1156-windev-curso-erpamarildo-14.html

https://www.youtube.com/watch?v=NXXjNSX_9Zg


De matos
22 May 2017
Let's do the registry change.
//Aula 1153 WinDev Curso ErpAmarildo 11 - Tabela Codigo de Alteração

//Nessa aula de hoje
//vamos fazer a alteração do registro.

//En esta clase de hoy
//Vamos a cambiar el registro.

//In this class today
//Let's do the registry change.

IF TableSelect(TABLE_QRY_RELACAO_EMPRESAS)=-1 THEN RETURN
_indice is int=TableSelect(TABLE_QRY_RELACAO_EMPRESAS)
HReadSeekFirst(empresa,empresaID,TABLE_QRY_RELACAO_EMPRESAS.COL_EmpresaID)
IF HFound(empresa) THEN
Open(WIN_Form_empresa)
END
TableDisplay(TABLE_QRY_RELACAO_EMPRESAS,taReExecuteQuery)
TableSelectPlus(TABLE_QRY_RELACAO_EMPRESAS,_indice)
De matos
18 May 2017
Let's change the Add Button Code

//Nessa aula de hoje
//Vamos alterar o Codigo do Botao Incluir
//na Relacao de Empresas

//In this class today
//Let's change the Add Button Code
//In the Business Relationship

//En esta clase de hoy
//Cambiar el código del botao Incluir
//En la Relación de Empresas


HReset(empresa)
Open(WIN_Form_empresa)
TableDisplay(TABLE_QRY_RELACAO_EMPRESAS,taReExecuteQuery)
TableSelectPlus(TABLE_QRY_RELACAO_EMPRESAS,TABLE_QRY_RELACAO_EMPRESAS..Occurrence)

//Blog com Video e Exemplo

https://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2374-video-aulas-amarildo-aula-1150-windev-curso-erpamarildo/read.awp

http://windevdesenvolvimento.blogspot.com.br/2017/05/aula-1150-windev-curso-erpamarildo-8.html

https://www.youtube.com/watch?v=r87vz1ref7k
De matos
15 May 2017

Last update: 07/23/2025

Send a report | Local help