While 1
$msg = GUIGetMsg(1)
Select
Case $msg[0] = $Obj2 Or $msg[0] = $Obj3
GUISetState(@SW_SHOW, $msg[1])
If $msg [0] = $Obj2 Then
GUISetState(@SW_SHOW, $Form2)
ElseIf $msg[0] = $Obj3 Then
GUISetState(@SW_SHOW, $Form3)
EndIf
Case $msg[0] = $GUI_EVENT_CLOSE
If $msg[1] = $Form2 Then
GUISetState(@SW_HIDE, $Form2)
ElseIf $msg[1] = $Form3 Then
GUISetState(@SW_HIDE, $Form3)
ElseIf $msg[1] = $Form1 Then
Exit
EndIf
EndSelect
WEnd