Servus
Und weil ich grad dabei bin - gleich noch eine Frage:
Wie kann man die Steuerung an das GUI zurück geben - um Eingaben zu korrigieren oder versäumte nachzuholen?
Beispiel:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 218, 286, 192, 114)
$Group1 = GUICtrlCreateGroup("Aufgabe auswählen:", 30, 20, 131, 166)
$Radio1 = GUICtrlCreateRadio("Radio1", 50, 50, 70, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 50, 90, 70, 17)
$Radio3 = GUICtrlCreateRadio("Radio3", 50, 130, 70, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Start", 30, 200, 131, 36)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $test = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
$test = 1
Case $Radio2
$test = 2
Case $Radio3
$test = 3
Case $Button1
If $test = 0 Then
If 2 = MsgBox(21, "Achtung", "Nix ausgewählt - bitte eine Aufgabe wählen") Then Exit
EndIf
; ?............? was sollte hier stehen ...
MsgBox(1,"","Anstelle dieser MsgBox sollte die Steuerung wieder an Form 1 zurück gegeben werden")
EndSwitch
WEnd
Natürlich gibt es Möglichkeiten, dieses Problem anders zu lösen - etwa bereits eine Radio-Auswahl vorzuschlagen oder die Starttaste erst nach einer solchen zu aktivieren oder ....
Aber mich würde genau diese Lösung interessieren.
SG, entsel