Global $hParentWin = GUICreate("ParentWindow", 615, 437)
GUICtrlCreateCheckbox("Checkbox1", 192, 96, 97, 17)
Local $Button1 = GUICtrlCreateButton("Button1", 248, 216, 75, 25)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_GiveMeChild()
EndSwitch
WEnd
Func _GiveMeChild()
GUISetState(@SW_DISABLE, $hParentWin)
Local $hChildWin = GUICreate("ChildWindow", 405, 293, -1, -1, -1, -1, $hParentWin)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
GUISetState(@SW_ENABLE, $hParentWin)
GUIDelete($hChildWin)
ExitLoop
EndSwitch
WEnd
EndFunc ;==>_GiveMeChild
|