編輯:
完整的文檔: http://www.autohotkey.com/board/topic/80577-how-to-animate-a-gui-window/
編輯2:
你提到它不適合你。下面是一個使用Ahk_L(又名Autohotkey_L或Autohotkey_Lexiko。)Windows 8的機器上工作示例:
DetectHiddenWindows, On ;//Allow hidden windows to be detectable
SetWinDelay, -1 ;//Make Window update very fast (smooth animation)
FADE := 524288
SHOW := 131072
HIDE := 65536
FADE_SHOW := FADE+SHOW
FADE_HIDE := FADE+HIDE
SetFormat, Integer, Hex
FADE_SHOW+=0 ;//Converts to 0xa0000
FADE_HIDE+=0 ;//Converts to 0x90000
SetFormat, Integer, d
Gui, Font, w500 s35 Center, Verdana
Gui, Add, Text, , Hello! This Window will hide in 5 Seconds.
Gui, Show, NA Hide, Test Window ; //Create the Window hidden
Gui, +LastFound
GUI_ID := WinExist() ;//Get Window ID
Duration := 3000 ;//Speed of Window showing/hiding
DllCall("AnimateWindow","UInt",GUI_ID,"Int",Duration,"UInt", FADE_SHOW) ;//Fade in Window
Sleep, 5000 ;//Pause for 5 seconds
DllCall("AnimateWindow","UInt",GUI_ID,"Int",Duration,"UInt", FADE_HIDE) ;//Fade out Window
Return
後,你嘗試過的代碼。它應該工作。 – KickAss 2015-02-12 17:31:50
請參閱下面我的工作示例代碼。 – KickAss 2015-02-12 19:55:22