[已解决]为什么点关闭后,桌面会出现关闭两字
本帖最后由 llllllxllllll 于 2013-8-14 22:33 编辑AU3编译的程序,为什么我点击窗口右上角的关闭按钮窗口关闭后,桌面会出现关闭两字。
#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=C:\Documents and Settings\Administrator\桌面\01.ico
#AutoIt3Wrapper_outfile=音效辅助.exe
#AutoIt3Wrapper_Res_Comment=音效辅助工具
#AutoIt3Wrapper_Res_Fileversion=2.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Liang
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Liang 音效辅助", 259, 220, -1, -1)
Global $PageControl1 = GUICtrlCreateTab(10, 15, 241, 154)
GUICtrlSetFont(-1, 10, 800, 0, "新宋体")
Global $TabSheet1 = GUICtrlCreateTabItem("常用音效")
Global $Button3 = GUICtrlCreateButton("激烈掌声", 21, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button4 = GUICtrlCreateButton("欢呼掌声", 96, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button5 = GUICtrlCreateButton("轻微掌声", 171, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button6 = GUICtrlCreateButton("邪恶的笑", 21, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button7 = GUICtrlCreateButton("群众笑声", 96, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button8 = GUICtrlCreateButton("乌鸦飞过", 171, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button9 = GUICtrlCreateButton("尖叫声", 20, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button10 = GUICtrlCreateButton("喝彩声", 96, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button11 = GUICtrlCreateButton("英文正数", 171, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $TabSheet2 = GUICtrlCreateTabItem("人物音效")
GUICtrlSetCursor(-1, 0)
Global $Button12 = GUICtrlCreateButton("打饱嗝", 21, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button13 = GUICtrlCreateButton("打哈欠", 96, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button14 = GUICtrlCreateButton("打呼噜", 171, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button15 = GUICtrlCreateButton("放屁声", 21, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button16 = GUICtrlCreateButton("心跳声", 96, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button17 = GUICtrlCreateButton("咳嗽声", 171, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button18 = GUICtrlCreateButton("小孩哭声", 20, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button19 = GUICtrlCreateButton("婴儿笑声", 96, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button20 = GUICtrlCreateButton("贱笑声", 171, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $TabSheet3 = GUICtrlCreateTabItem("网络热门")
Global $Button21 = GUICtrlCreateButton("男嘉宾出场", 21, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button22 = GUICtrlCreateButton("女嘉宾出场", 96, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button23 = GUICtrlCreateButton("八戒背媳妇", 171, 45, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button24 = GUICtrlCreateButton("给枪上膛", 21, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button25 = GUICtrlCreateButton("狙击枪声", 96, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button26 = GUICtrlCreateButton("机枪扫射", 171, 85, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button27 = GUICtrlCreateButton("救护车", 20, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button28 = GUICtrlCreateButton("砸玻璃", 96, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button29 = GUICtrlCreateButton("小狗叫声", 171, 125, 66, 31)
GUICtrlSetCursor(-1, 0)
GUICtrlSetState(-1, $GUI_SHOW)
GUICtrlCreateTabItem("")
Global $Button1 = GUICtrlCreateButton("停止(&T)", 21, 177, 66, 31)
GUICtrlSetCursor(-1, 0)
Global $Button2 = GUICtrlCreateButton("退出(&X)", 171, 177, 66, 31)
GUICtrlSetCursor(-1, 0)
#EndRegion ### END Koda GUI section ###
_Main()
Exit
Func _Main()
GUISetState(@SW_SHOW)
Local $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
Case $Button1
SoundPlay("")
Case $Button3
SoundPlay(@ScriptDir & "\音效辅助.dat\激烈掌声.mp3", 0)
Case $Button4
SoundPlay(@ScriptDir & "\欢呼掌声.mp3", 0)
Case $Button5
SoundPlay(@ScriptDir & "\轻微掌声.mp3", 0)
Case $Button6
SoundPlay(@ScriptDir & "\邪恶的笑.mp3", 0)
Case $Button7
SoundPlay(@ScriptDir & "\群众笑声.mp3", 0)
Case $Button8
SoundPlay(@ScriptDir & "\乌鸦飞过.mp3", 0)
Case $Button9
SoundPlay(@ScriptDir & "\尖叫声.mp3", 0)
Case $Button10
SoundPlay(@ScriptDir & "\喝彩声.mp3", 0)
Case $Button11
SoundPlay(@ScriptDir & "\英文正数.mp3", 0)
Case $Button12
SoundPlay(@ScriptDir & "\打饱嗝声.mp3", 0)
Case $Button13
SoundPlay(@ScriptDir & "\哈欠声.mp3", 0)
Case $Button14
SoundPlay(@ScriptDir & "\打呼噜.mp3", 0)
Case $Button15
SoundPlay(@ScriptDir & "\放屁.mp3", 0)
Case $Button16
SoundPlay(@ScriptDir & "\心跳声.mp3", 0)
Case $Button17
SoundPlay(@ScriptDir & "\咳嗽.wav", 0)
Case $Button18
SoundPlay(@ScriptDir & "\小孩哭声.mp3", 0)
Case $Button19
SoundPlay(@ScriptDir & "\婴儿笑声.mp3", 0)
Case $Button20
SoundPlay(@ScriptDir & "\贱笑.mp3", 0)
Case $Button21
SoundPlay(@ScriptDir & "\男嘉宾出场.mp3", 0)
Case $Button22
SoundPlay(@ScriptDir & "\女嘉宾出场.mp3", 0)
Case $Button23
SoundPlay(@ScriptDir & "\八戒背媳妇.mp3", 0)
Case $Button24
SoundPlay(@ScriptDir & "\给枪上膛.mp3", 0)
Case $Button25
SoundPlay(@ScriptDir & "\狙击.mp3", 0)
Case $Button26
SoundPlay(@ScriptDir & "\机枪扫射.mp3", 0)
Case $Button27
SoundPlay(@ScriptDir & "\救护车.mp3", 0)
Case $Button28
SoundPlay(@ScriptDir & "\砸玻璃.mp3", 0)
Case $Button29
SoundPlay(@ScriptDir & "\小狗叫声.mp3", 0)
EndSwitch
WEnd
EndFunc 把此代碼放到腳本的最後面
ToolTip("關閉", 840, 526) 樓主不好意思,先前沒有看清楚問題
情況是這樣的:
你的代碼裡是不是有這一行代碼呀
ToolTip("關閉", 840, 526) 回复 3# txen548
没有啊,在这里下的源码有的也会这样,我就搞不懂了 把你的源代碼發出來 回复 5# txen548
代码已发,还请帮忙看下。谢谢 這個不影響吧,我試了我的GUI腳本關閉後也會在桌面出現關閉字樣,不知道是什麼問題 這個不影響吧,我試了我的GUI腳本關閉後也會在桌面出現關閉字樣,不知道是什麼問題
txen548 发表于 2013-8-14 14:26 http://www.autoitx.com/images/common/back.gif
影响倒没,只是很纳闷啊 哦,我以前也沒有注意到這個,應該都會出現這樣的問題吧 回复 9# txen548
有的会有的不会 是的,不知是哪裡的問題 回复 4# llllllxllllll
应该是退出时主窗体没有及时得到销毁而发生'残留'吧.
试试把相关代码改为: Case $GUI_EVENT_CLOSE,$Button2
GUIDelete($Form1)
ExitLoop 回复 12# user3000
谢谢你!用你的代码改了下。现在可以了 回复 11# txen548
谢谢你!我的问题解决了,用了12楼的方法。现在不会出现关闭两字了
页:
[1]