找回密码
 加入
搜索
查看: 8461|回复: 22

[AU3基础] 消息提示框图标如何自定义???

 火... [复制链接]
发表于 2012-1-7 10:30:14 | 显示全部楼层 |阅读模式
如题,脚本开始时用#AutoIt3Wrapper_Icon自定义图标了,但按F7编译出来的.exe消息提示框是系统图标,如图:

本帖子中包含更多资源

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

×
发表于 2012-1-7 10:46:01 | 显示全部楼层
你用CTRL+F7编译不是可以咯!
 楼主| 发表于 2012-1-7 15:13:56 | 显示全部楼层


测试过貌似不行....

消息标志用的是4096,显示的图标还是不对...

本帖子中包含更多资源

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

×
发表于 2012-1-7 16:42:43 | 显示全部楼层
可以换个方法变通下啊。


#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\..\WINDOWS\system32\SHELL32.dll
#AutoIt3Wrapper_Outfile=3.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#Include <GuiEdit.au3>
#EndRegion
$Form1 = GUICreate("Form1", 623, 442, -1, -1)
$MenuItem3 = GUICtrlCreateMenu("菜单(&F)")
$MenuItem2 = GUICtrlCreateMenu("查看(&V)")
$MenuItem1 = GUICtrlCreateMenu("帮助(&H)")
$MenuItem4 = GUICtrlCreateMenuItem("关于(&A)", $MenuItem1)
GUISetState(@SW_SHOW)

Func _About()
        $Software_Name = "test" ;名称
        $ver = "v0.1"
        $About_Soft_notic = "test test test test test test test";说明

        $About_Form1 = GUICreate("关于", 361, 331,-1,-1)
        GUISetIcon(@ScriptDir & "\1.ico", -222, $About_Form1)
        $About_Icon1 = GUICtrlCreateIcon("", -1, 20, 24, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))
        GUICtrlSetImage(-1, @ScriptDir & "\1.ico", -222)
        $About_Label1 = GUICtrlCreateLabel("软件名称:", 88, 24, 64, 17)
        $About_Label2 = GUICtrlCreateLabel($Software_Name, 160, 24, 103, 17)
        $About_Label3 = GUICtrlCreateLabel("软件版本:", 88, 56, 64, 17)
        $About_Label4 = GUICtrlCreateLabel($ver, 160, 56, 25, 17)
        $About_Group1 = GUICtrlCreateGroup("说明", 8, 80, 345, 137)
        $about_Edit1 = GUICtrlCreateEdit($About_Soft_notic, 16, 96, 329, 113, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
        GUICtrlCreateGroup("", -99, -99, 1, 1)

        $About_Group2 = GUICtrlCreateGroup("相关链接", 8, 224, 345, 57)
        $About_Label5 = GUICtrlCreateLabel("官方网站:", 24, 248, 64, 17)
        $About_Url1 = GUICtrlCreateLabel("www.autoitx.com", 88, 248, 78, 17)
        GUICtrlSetColor(-1, 0x191970)
        GUICtrlSetFont(-1, "9", "400", 4)
        GUICtrlSetCursor(-1, 0)

        $About_Label7 = GUICtrlCreateLabel("常逛论坛:", 176, 248, 64, 17)
        $About_Url2 = GUICtrlCreateLabel("www.autoitx.com", 240, 248, 97, 17)
        GUICtrlSetColor(-1, 0x191970)
        GUICtrlSetFont(-1, "9", "400", 4)
        GUICtrlSetCursor(-1, 0)
        GUICtrlCreateGroup("", -99, -99, 1, 1)
        $About_Button1 = GUICtrlCreateButton("确定", 280, 296, 75, 25)
        GUISetState(@SW_SHOW)

        WinSetOnTop($About_Form1, "", 1);置顶
        
        While 1
                $nMsg = GUIGetMsg()
                Switch $nMsg
                        Case $GUI_EVENT_CLOSE, $About_Button1
                                GUIDelete($About_Form1)
                                Return 0
                        Case $About_Url1
                                Run("explorer.exe http://www.autoitx.com")
                        Case $About_Url2
                                Run("explorer.exe http://www.autoitx.com")
                EndSwitch
        WEnd
EndFunc

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $MenuItem4
                        _About()
        Case $GUI_EVENT_CLOSE
                        Exit
        EndSwitch
WEnd

本帖子中包含更多资源

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

×
发表于 2012-1-7 17:04:13 | 显示全部楼层
你是在纠结你消息框的标志吗?
MsgBox(4096,"@注册","注册成功")
MsgBox(0,"@注册","注册成功")
发表于 2012-1-7 17:06:06 | 显示全部楼层
回复 5# 502762378


   他是要MSGBOX显示自定义图标。
发表于 2012-1-7 17:40:34 | 显示全部楼层
么办法了,自己定义一个消息框吧那
 楼主| 发表于 2012-1-7 19:27:56 | 显示全部楼层
回复 4# zcx880517


    太长了,看不明白...
$Button3 = GUICtrlCreateButton("关于(&A)", 60, 192, 65, 21)
        MsgBox(4096, "@注册", "注册成功!", 2)
我的代码是这么写的...
发表于 2012-1-7 22:14:33 | 显示全部楼层
回复 8# 邪恶海盗


    用FUNC代替MSGBOX  子窗口
 楼主| 发表于 2012-1-8 10:37:43 | 显示全部楼层
回复 9# zcx880517


    懒,不整了,就这样吧...
发表于 2012-1-8 21:03:16 | 显示全部楼层
回复 10# 邪恶海盗


    其实很简单。。
发表于 2012-1-8 22:09:35 | 显示全部楼层
对于高手们真的很简单。。。。学习了
 楼主| 发表于 2012-1-9 09:00:36 | 显示全部楼层
回复 11# zcx880517


    对于菜鸟来说,捡个葫芦也不一定能画出瓢来....
发表于 2012-1-9 14:43:34 | 显示全部楼层
回复 13# 邪恶海盗


    你不画怎么知道你画不出来?
发表于 2012-1-9 14:50:05 | 显示全部楼层
努力学习中,AU3真强大
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-18 14:16 , Processed in 0.087753 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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