找回密码
 加入
搜索
查看: 2816|回复: 6

[AU3基础] [已解决]关于msgbox未消失前点击其他Button仍有有效的问题

  [复制链接]
发表于 2010-10-31 22:33:44 | 显示全部楼层 |阅读模式
本帖最后由 smooth 于 2010-11-9 20:54 编辑

大家好。我对每一个Button设置了msgbox,
现在有一个问题,就是假设点击某个Button
弹出了msgbox之后,再点击其他Button也是
有效的,只是在这个msgbox退出之后,
怎么解决,使得弹出msgbox之后,再点击
其他Button就无效了呢?谢谢。
发表于 2010-11-1 00:45:23 | 显示全部楼层
最好上代码,不然别人很难猜懂你的意思!
发表于 2010-11-1 02:15:26 | 显示全部楼层
回复 1# smooth

虽然语句不通,但还是明白你的要求的。
au3是单线程,msgbox会阻塞程序执行。但可以使用下面网址的例子实现。或者自己画GUI实现类似box

http://www.autoitx.com/forum.php ... 5643&highlight=
发表于 2010-11-1 06:40:43 | 显示全部楼层
回复 1# smooth


    没看懂你什么意思,不知道你是不是想要这样的
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 302, 169, 372, 262)
$Button1 = GUICtrlCreateButton("Button1", 48, 74, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 152, 72, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        MsgBox(0,"Button1","Button1","",$Form1)
                Case $Button2
                        MsgBox(0,"Button2","Button2","",$Form1)
        EndSwitch
WEnd

评分

参与人数 1金钱 +20 收起 理由
3mile + 20 学习了

查看全部评分

发表于 2010-11-1 07:54:33 | 显示全部楼层
回复 1# smooth

不知道合不合用,自己试试吧

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2010-11-1 08:32:08 | 显示全部楼层
回复 4# guland

感谢G版和各位的解答,就是要这样的。
MsgBox(4, "", "", 0, $Form)
发表于 2010-11-1 10:20:29 | 显示全部楼层
回复 6# smooth

又理解错误~失误失误。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 09:36 , Processed in 0.079165 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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