#include <GUIConstantsEx.au3>
#include <GuiButton.au3>
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 227, 159, 192, 124)
GUISetOnEvent(-3, 'Radio')
$Radio1 = GUICtrlCreateRadio("Radio1", 160, 16, 57, 41)
GUICtrlSetOnEvent(-1, "Radio")
$Radio2 = GUICtrlCreateRadio("Radio1", 160, 64, 65, 33)
GUICtrlSetOnEvent(-1, "Radio")
$Radio3 = GUICtrlCreateRadio("退出", 160, 112, 65, 33)
GUICtrlSetOnEvent(-1, "Radio")
;GUICtrlSetState($radio1, $GUI_CHECKED)
GUISetState(@SW_SHOW)
_GUICtrlButton_Click($Radio1)
While 1
Sleep(1000)
WEnd
Func Radio()
Switch @GUI_CtrlId
Case $Radio1
MsgBox(0, 0, @GUI_CtrlId)
Case $Radio2
MsgBox(0, 0, @GUI_CtrlId)
Case $Radio3, -3
Exit
EndSwitch
EndFunc ;==>Radio
|