找回密码
 加入
搜索
查看: 1101|回复: 1

关于复选框的问题?

[复制链接]
发表于 2008-10-25 16:14:07 | 显示全部楼层 |阅读模式
谁能给个复选框的不定项选择完成不同任务的例子么?
发表于 2009-7-22 01:19:08 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### 
$Form1 = GUICreate("复选框实例", 476, 277, 193, 125)
$drivers = GUICtrlCreateCheckbox("drivers", 136, 56, 97, 17)
$Button1 = GUICtrlCreateButton("确定", 112, 152, 75, 25, 0)
$Button2 = GUICtrlCreateButton("关闭", 216, 152, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        If GUICtrlRead($drivers)=1 Then
                                MsgBox(64,"复选框实例",GUICtrlRead($drivers,1)&"被中!")
                        Else
                                MsgBox(64,"复选框实例",GUICtrlRead($drivers,1)&"未被中!")
                        EndIf
                Case $Button2
                        Exit
        EndSwitch
WEnd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-6 07:37 , Processed in 0.068073 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表