子窗口與主窗口分開處理

#include <GUIConstantsEx.au3>
 
$mainwindow = GUICreate("Hello World", 300, 200)
GUICtrlCreateLabel("Hello world!", 30, 10)
$okbutton = GUICtrlCreateButton("opened the subform", 20, 30, 150)
 
主窗口點擊按鈕後又建立了一個新的子窗口,在關閉子窗口時主窗口也關閉了
$dummywindow
= GUICreate("Dummy window for testing ", 200, 100) GUISwitch($mainwindow) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg(1) Select Case $msg[0] = $okbutton GUISetState(@SW_SHOW,$dummywindow) Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $mainwindow Exit Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $dummywindow GUISetState(@SW_HIDE,$dummywindow) EndSelect WEnd
相關文章
相關標籤/搜索