Hallo,
ich habe folgendes Problem:
#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit][/autoit][autoit]$Form1 = GUICreate("Form2", 413, 298, 291, 177)
GUISetState(@SW_SHOW)
$Form2 = GUICreate("popup", 413, 298, 291, 177)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
If IsDeclared("Form2") AND GUIDelete($Form2) Then
MsgBox(0,"",GUISwitch($Form1))
ContinueCase
EndIf
MsgBox(0,"","GUI Close")
GUIDelete()
EndSwitch
WEnd
Es geht darum, dass er wenn das zweite Fenster (Form2) offen ist und ein $GUI_EVENT_CLOSE ausgelöst wird dieses Fenster zwar schließt, aber nicht das erste. (Also wenn ich dann wieder ein $GUI_EVENT_CLOSE auslöse) Wenn ich bei GUIDelete() das Handle mitgebe macht er es, aber warum wechselt nicht GUISwitch schon das aktive Fenster?
Danke für die Antwort im voraus