#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 157, 59, 192, 124) $Button1 = GUICtrlCreateButton("确定", 16, 16, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 While 1 MsgBox (0,"","你点击了【确定】按钮") Sleep(4000) WEnd EndSwitch WEnd
您需要 登录 才可以下载或查看,没有账号?加入
举报
MsgBox (0,"","你点击了【确定】按钮") 先说啊!我也是是新手,如果有说错的地方请多包含 我觉得可以将MsgBox (0,"","")改成MsgBox (1,"","")吧! 这样就有确定和取消,在赋予取消的命令应该就可以了。 只是思路 ... 水木子 发表于 2009-6-30 17:45
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Dim $start = 0, $ostart $Form1 = GUICreate("Form1", 157, 59, 192, 124) $Button1 = GUICtrlCreateButton("确定", 16, 16, 75, 25, $WS_GROUP) GUICtrlSetOnEvent(-1, "gui") GUISetOnEvent($GUI_EVENT_CLOSE, "gui") GUISetState(@SW_SHOW) While 1 If $start = 1 Then MsgBox(0, "", "你点击了【确定】按钮") Sleep(4000) EndIf WEnd Exit Func gui() Switch @GUI_CtrlId Case $GUI_EVENT_CLOSE $start = 0 Exit Case $Button1 $start = 1 EndSwitch EndFunc ;==>gui
#include <GUIConstants.au3> #include <Timers.au3> $Form = GUICreate("例子一", 307, 81, -1, -1) $Button1 = GUICtrlCreateButton("开始", 32, 24, 97, 33, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Dim $i=0 $iTimeProgres4 = _Timer_SetTimer($Form ,4000,'fit') EndSwitch WEnd Func fit($hWnd, $iMsg, $iwParam, $ilParam) MsgBox (1,"","你点击了【确定】按钮") EndFunc
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-25 07:34 , Processed in 0.084989 second(s), 20 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.