切換用于 GUI 函數(shù)的“當(dāng)前”窗口。
GUISwitch ( 窗口句柄 )
參數(shù)
窗口句柄 | 要切換到的窗口句柄, |
返回值
成功: | 返回上一個(gè)“當(dāng)前”窗口的句柄。 |
失敗: | 返回一個(gè)空的句柄。 |
注意
許多 GUI 函數(shù)(在沒(méi)有指定目標(biāo)窗口時(shí))都是把“當(dāng)前”窗口作為默認(rèn)窗口目標(biāo),“當(dāng)前”窗口通常是指由 GUICreate 創(chuàng)建的最后一個(gè)窗口。本函數(shù)使得我們能夠指定其它窗口成為“當(dāng)前”窗口。
相關(guān)
GUICreate, GUIDelete
示例
#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