AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de ventanas
  • Modal opening/Non-modal opening
  • Differences between the Invisible and OutsideScreen constants
  • Inactive or invisible window
  • Closing the window
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Identifies or modifies the window status.
Note The function WinStatus function can also be used to test the existence of a window.
Ejemplo
// Identify the status of current window
ResWinStatus = WinStatus()
// Modify the state of a window
SWITCH WinStatus(WIN_WindowName)
	CASE Active
		WinStatus(WIN_WindowName, Grayed)
	CASE NotFound
		Open(WIN_WindowName)
END
Sintaxis

Identifying the window status Ocultar los detalles

<Result> = WinStatus([<Window used>])
<Result>: Constant
Current status of window:
ActiveActive window (window in edit, even if it does not have the focus).
DisplayOnlyInactive window (this window is not editable).
GrayedThe window controls are grayed.
InvisibleWindow invisible on the screen and inactive.
NotFoundWindow closed or not found.
OutsideScreenActive window displayed outside the visible screen area.
<Window used>: Optional window name or optional string
Name or alias of the window to be used.
If this parameter is not specified or is an empty string (""), the status of current window is returned.

Modifying the window status Ocultar los detalles

<Result> = WinStatus(<Window used> , <Window status>)
<Result>: Constant
Status after modification:
ActiveActive window (editable window).
DisplayOnlyInactive window (this window is not editable).
GrayedThe window controls are grayed.
InvisibleWindow invisible on the screen and inactive.
NotFoundWindow closed or not found.
OutsideScreenActive window displayed outside the visible screen area.
<Window used>: Window name or string
Name or alias of the window to be used.
If this parameter corresponds to an empty string (""), the status of the current window is modified.
<Window status>: Constant
Specifies the new status and new positioning of the specified window.
If this parameter corresponds to an empty string (""), the change of position (Above, AboveAll, Normal constant) for a window is canceled.
AboveThe window moves to the foreground in relation to the other application windows.
AboveAllThe window moves to the foreground in relation to all other windows, even to the ones of the other applications. This constant is ignored for the MDI child windows displayed from an MDI parent window.

LinuxJava This constant is not available.
ActiveThe window becomes active (editable window).
DisplayOnlyThe window becomes inactive (no input is allowed in the window controls).
GrayedThe window controls are grayed.
InvisibleThe window becomes invisible and inactive.
NormalA window in AboveAll mode switches to the normal mode (the windows of other applications can be displayed in the foreground). In the other cases, this constant has no effect.
NotFoundThe window is closed. A WLanguage error occurs if this window does not exist.
OutsideScreenThe window remains active but is positioned outside the visible screen area.
TopActiveThe window becomes active (window in edit) and it is displayed in the foreground. This constant corresponds to the result of a click performed in the title bar of window.
Observaciones

Modal opening/Non-modal opening

In modal opening (MDI parent window and MDI child window), WinStatus cannot be used:
  • to make a parent window active.
  • to display a child window "above" with the Above or AboveAll constant from an MDI parent window.
In modal opening, if a parent window is made invisible, the child window is also made invisible.
In non-modal opening, if a parent window with at least one child window is made invisible, the child windows are not made invisible.

Differences between the Invisible and OutsideScreen constants

  • If the type of a parent window is:
    • OutsideScreen, this window is displayed in the list of Windows applications (accessible via Alt Tab).
    • Invisible, this window is not displayed in the list of Windows applications (accessible via Alt + Tab).
  • The coordinates of an OutsideScreen window are negative.
  • Switching from:
    • Invisible to Active triggers the execution of processes for focus gain and focus loss in an incoherent way.
    • OutsideScreen to Active triggers the proper execution of processes for focus gain and focus loss.
Tip Prefer the OffScreen state to the Invisible.
  • If an OutsideScreen window is redisplayed by WinStatus with the Active constant, WinStatus does not set the focus to the window.
  • If the OutsideScreen window did not have focus, it does not have focus after the call to WinStatus.

Inactive or invisible window

If the current window becomes inactive or invisible, the "loss of focus" process of the window will be run before the change of status.

Closing the window

The following code is used to close the window:
WinStatus(<Window name>, NotFound)
This code is equivalent to Close.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Exemplo WinStatus/OpenChild/SetFocus|
Exemplo WinStatus/OpenChild/SetFocus|

IF WinStatus(WIN_tela_exemplo)=NotFound THEN
OpenChild(WIN_tela_exemplo)
ELSE
Restore(WIN_tela_exemplo)
SetFocus(WIN_tela_exemplo)
END

// Blog com Video e exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-977-windev-window-janela-6.html

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

De matos
04 12 2016

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local