ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / Reserved keywords
  • Handling the current internal window
  • Using MyInternalWindow in a procedure
  • WLanguage functions and current internal window
  • Summary
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
MyInternalWindow is used to handle the current internal window. When running the internal window, MyInternalWindow is replaced with the internal window (and not by the name of the internal window). The MyInternalWindow keyword is used like an internal window.
Benefit: The MyInternalWindow keyword can be used to make a local code (control, button, etc.) or a global code (global procedure, class, etc.) independent of the current internal window.
Example
// Retrieve the background color of the current internal window
BackgroundColor = MyInternalWindow.BackgroundColor
Syntax
MyInternalWindow
Remarks

Handling the current internal window

  • The MyInternalWindow keyword is always replaced by the current internal window. For example, using the BackgroundColor property:
    MyInternalWindow.BackgroundColor = LightRed
    MyColor = MyInternalWindow.BackgroundColor
     
    // Pass as parameter:
    CallProcedure(MyInternalWindow)
  • If the MyInternalWindow keyword is to be converted to a string, the result of the Value property is returned. You can assign a value to this property programmatically.
    Trace(MyInternalWindow) // Displays the Value property of the internal window

    Example not to do:
    ExecuteProcess(MyInternalWindow, trtChange)

    To do:
    ExecuteProcess(MyInternalWindow.Name, trtChange)
  • The MyInternalWindow keyword can only be used in processes or events that manipulate a window (e.g., processes associated with a control, a window, etc.). The MyInternalWindow keyword cannot be used in a report. To specify the current report in a report, use MyReport
  • If there is no current internal window, MyInternalWindow returns the main window that contains the process or event being run (in this case, MyInternalWindow is equivalent to MyWindow).
  • The MyInternalWindow keyword does not allow using global variables declared in the internal window.
  • To handle a control in an internal window using the MyInternalWindow keyword, you can use the following syntax:
    Info({MyInternalWindow.Name + ".Button2"}..Caption)

Using MyInternalWindow in a procedure

MyInternalWindow can be used in a local or global procedure only if this procedure manipulates the current internal window. In that case, MyInternalWindow refers to the current internal window.
In a local procedure, MyInternalWindow corresponds to the internal window to which the procedure belongs.

WLanguage functions and current internal window

To specify the current internal window in the WLanguage functions that accept a name of internal window as parameter, use:
  • an empty string,
  • the MyInternalWindow keyword directly.

Summary

Code where MyInternalWindow is usedMyInternalWindow corresponds to
internal windowinternal window
control of internal windowinternal window
procedure of internal window with a direct call from a code of the internal windowinternal window
procedure of internal window with a call via <InternalWindow>.<Procedure>internal window
supercontrol of internal windowinternal window
control of supercontrol of internal windowinternal window
procedure of supercontrol of internal window with a direct call from a code of the supercontrolinternal window
procedure of supercontrol of internal window with a call via <Supercontrol>.<Procedure>internal window
internal window controlinternal window

The MyInternalWindow keyword can only be used from a window event or procedure.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help