- Сообщения
- 3,999
- Репутация
- 967
agikon
Это вам нужно?
Это вам нужно?
Код:
#include <GUIConstantsEx.au3>
#Include <WinAPIEx.au3>
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",3)
$about = TrayCreateItem("About")
TrayItemSetOnEvent(-1,"_About")
TrayCreateItem("")
$exit = TrayCreateItem("Выход")
TrayItemSetOnEvent(-1,"_Exit")
TraySetState()
GUICreate('test', 400, 200)
$nRadio1 = GUICtrlCreateRadio('aaa', 50, 20, 130, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
$nRadio2 = GUICtrlCreateRadio('bbb', 50, 60, 150, 20)
$nRadio3 = GUICtrlCreateRadio('ccc', 50, 90, 100, 20)
$nButton = GUICtrlCreateButton('Go', 50, 120, 100, 40)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $nButton
If BitAND(GUICtrlRead($nRadio1), $GUI_CHECKED) Then
MsgBox(64, 'aaa', 'aaa')
ElseIf BitAND(GUICtrlRead($nRadio2), $GUI_CHECKED) Then
MsgBox(64, 'bbb', 'bbbb')
ElseIf BitAND(GUICtrlRead($nRadio3), $GUI_CHECKED) Then
MsgBox(64, 'ccc', 'ccc')
EndIf
EndSwitch
WEnd
Func _About()
Msgbox(0,"Info","Bla bla bla")
EndFunc
Func _Exit()
Exit
EndFunc