Switches the current window used for GUI functions.
GUISwitch ( winhandle [, tabitemID] )
| winhandle | The handle of the window to switch to. |
| tabitemID | [optional] controlID of the tabitem control to be selected. |
| Success: | Returns the handle of the previously current. |
| Failure: | Returns a NULL handle. |
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $parent1, $parent2, $tabitem, $msg
$parent1 = GUICreate("Parent1")
GUICtrlCreateTab(10, 10)
$tabitem = GUICtrlCreateTabItem("tab1")
GUICtrlCreateTabItem("tab2")
GUICtrlCreateTabItem("")
$parent2 = GUICreate("Parent2", -1, -1, 100, 100)
GUISwitch($parent2)
GUISetState()
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
GUISwitch($parent1, $tabitem)
GUICtrlCreateButton("OK", 50, 50, 50)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW, $parent1)
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example