Function Reference

GUISwitch

Switches the current window used for GUI functions.

GUISwitch ( winhandle )

 

Parameters

winhandle The handle of the window to switch to.

 

Return Value

Success: Returns the handle of the previously current.
Failure: Returns a NULL handle.

 

Remarks

Many of the GUI specific functions work on the "current" window - this is usually the last window created with GUICreate. This function allows you to make another window "current".

 

Related

GUICreate, GUIDelete

 

Example


#include <GUIConstants.au3>

$parent1= GUICreate("Parent1")
$parent2= GUICreate("Parent2", -1, -1, 100, 100)

GUISwitch($parent2)
GUISetState()
Do
$msg=GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE

GUISwitch($parent1)
GUISetState()
Do
$msg=GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE