找回密码
 加入
搜索
查看: 1552|回复: 3

[AU3基础] 请教下,关于怎么写?

[复制链接]
发表于 2010-8-18 13:46:18 | 显示全部楼层 |阅读模式
本人菜鸟,想请教下,关于怎么写,就是点击关于,弹出个框。最好有个实例。
发表于 2010-8-18 15:13:15 | 显示全部楼层
回复 1# G,man。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example1()
Func Example1()
        Local $msg,$form1

        GUICreate("My GUI")
        GUISetState(@SW_SHOW)
        $form1=GUICtrlCreateButton("关于",200,100,100,40)
        While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case $form1
                        MsgBox(4096, "关于", "这个消息框将会显示10秒", 10)
                Case $GUI_EVENT_CLOSE
                        Exit
EndSwitch
        WEnd
EndFunc

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-8-18 15:36:37 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 633, 454, -1, -1)
$MenuItem1 = GUICtrlCreateMenu("文件&(F)")
$MenuItem2 = GUICtrlCreateMenu("编辑&(E)")
$MenuItem3 = GUICtrlCreateMenu("查看&(V)")
$MenuItem4 = GUICtrlCreateMenu("帮助&(H)")
$fileitem41 = GUICtrlCreateMenuitem ("关羽(&G)",$MenuItem4)
$fileitem42 = GUICtrlCreateMenuitem ("张飞(&Z)",$MenuItem4)
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                case $fileitem41
                        msgbox(0,"","这是关羽!")
                case $fileitem42
                        msgbox(0,"","这是张飞!")
        EndSwitch
WEnd

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-8-18 15:58:04 | 显示全部楼层
谢谢楼上两位了。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-21 22:52 , Processed in 0.090838 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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