PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Modal opening/Non-modal opening
  • Differences between the Invisible and OutsideScreen constants
  • Inactive or invisible window
  • Closing the 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
Identifies or modifies the window status.
Note: WinStatus can also be used to check the existence of a window.
Versions 16 and later
Android This function is now available for the Android applications.
New in version 16
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
Universal Windows 10 App This function is now available for the WINDEV applications in Linux.
New in version 19
Universal Windows 10 App This function is now available for the WINDEV applications in Linux.
Universal Windows 10 App This function is now available for the WINDEV applications in Linux.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Example
// Identify the status of current window
ResWinStatus = WinStatus()
// Modify the status of a window
SWITCH WinStatus(WIN_WindowName)
CASE Active
WinStatus(WIN_WindowName, Grayed)
CASE NotFound
Open(WIN_WindowName)
END
Syntax

Identifying the window status Hide the details

<Result> = WinStatus([<Window Name>])
<Result>: Constant
Current status of window:
ActiveActive window (window in edit).
DisplayOnlyInactive window (this window is not in edit).
GrayedThe window controls are grayed.
OutsideScreenActive window displayed outside the visible screen area.
AndroidiPhone/iPadApple WatchUniversal Windows 10 App This constant is not available.
NotFoundWindow closed or not found.
InvisibleWindow invisible on the screen and inactive.
<Window Name>: Optional character string (with or without quotes)
Name or alias of window to use.
If this parameter is not specified or if it corresponds to an empty string (""), the status of current window is returned.

Modifying the window status Hide the details

<Result> = WinStatus(<Window Name> , <Window Status>)
<Result>: Constant
Status after modification:
ActiveActive window (window in edit).
DisplayOnlyInactive window (this window is not in edit).
GrayedThe window controls are grayed.
OutsideScreenActive window displayed outside the visible screen area.
AndroidiPhone/iPadApple WatchUniversal Windows 10 App This constant is not available.
NotFoundWindow closed or not found.
InvisibleWindow invisible on the screen and inactive.
AndroidiPhone/iPadApple Watch No window can be made invisible.
<Window Name>: Character string (with or without quotes)
Name or alias of window to use.
If this parameter corresponds to an empty string (""), the status of 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.
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 the window.
iPhone/iPadApple WatchUniversal Windows 10 App This constant is not available.
ActiveThe window becomes active (window in edit).
DisplayOnlyThe window becomes inactive (no input is allowed in the window controls).
InvisibleThe window becomes invisible and inactive.
AndroidiPhone/iPadApple Watch No window can be made invisible.
GrayedThe window controls are grayed.
AboveThe window moves to the foreground in relation to the other application windows.
iPhone/iPadApple WatchUniversal Windows 10 App This constant is not available.
AboveAllThe window moves to the foreground in relation to all the other windows, even to the ones of the other applications. This constant is ignored for the MDI child windows displayed from a MDI parent window.

LinuxAndroidiPhone/iPadUniversal Windows 10 AppJava This constant is not available.
OutsideScreenThe window remains active but is positioned outside the visible screen area.
Universal Windows 10 App This constant is not available.
NotFoundThe window is closed. A WLanguage error occurs if this window does not exist.
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.
Universal Windows 10 App This constant is not available.
Remarks

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: You should use the OutsideScreen status rather than the Invisible status.
  • If an OutsideScreen window is re-displayed byWinStatus and the Active constant, WinStatus does not give focus to the window.
  • If the OutsideScreen window did not have focus, it does not have focus after the call to WinStatus.
AndroidiPhone/iPadApple Watch No window can be made invisible.

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.
AndroidiPhone/iPadApple Watch No window can be made invisible.

Closing the window

The following code is used to close the window:
WinStatus(<WindowName>, NotFound)
This code is equivalent to Close.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
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
Dec. 04 2016