#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Mainboard()
Func Mainboard()
Local $radio1, $radio2, $radio3, $radio4, $msg, $top_pic, $font, $Button1, $Button2
$font = "MS Sans Serif"
GUICreate("Main Board Test",280,150) ; will create a dialog box that when displayed is centered
$radio1 = GUICtrlCreateRadio("注销", 10, 50, 60, 20)
GUICtrlSetFont(-1, 15, 200, 0, $font)
$radio2 = GUICtrlCreateRadio("重起", 73, 50, 60, 20)
GUICtrlSetFont(-1, 15, 200, 0, $font)
$radio3 = GUICtrlCreateRadio("待机", 142, 50, 60, 20)
GUICtrlSetFont(-1, 15, 200, 0, $font)
$radio4 = GUICtrlCreateRadio("休眠", 205, 50, 60, 20)
GUICtrlSetFont(-1, 15, 200, 0, $font)
;GUICtrlSetState($radio1, $GUI_CHECKED) ;默认选中引项
$Button1 = GUICtrlCreateButton("确 定",142,90,60,20,0)
GUICtrlSetFont(-1, 10, 200, 0, $font)
;GUICtrlSetOnEvent(-1, "logoffClick")
$Button2 = GUICtrlCreateButton("关 闭",205,90,60,20,0)
GUICtrlSetFont(-1, 10, 200, 0, $font)
;GUICtrlSetOnEvent(-1, "Button2Click")
GUISetFont(11, 400, 4)
GUICtrlCreateLabel("Completion Time: 2009-03-25",10,125,200,15)
GUISetState() ; will display an dialog box with 1 checkbox
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button2
ExitLoop
Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
MsgBox(64, 'Info:', '注销')
Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
MsgBox(64, 'Info:', '重起')
Case $msg = $radio3 And BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED
MsgBox(64, 'Info:', '待机')
Case $msg = $radio4 And BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED
MsgBox(64, 'Info:', '休眠')
EndSelect
WEnd
EndFunc ;==>Mainboard
大侠们帮我看一下吧,现在只要选中其中的任何一个就立刻执行,我想让其在选中时不做任何动作,只有在点击确认后再执行,在此先谢谢了
[ 本帖最后由 hhasee 于 2009-4-17 11:03 编辑 ] |