Created
September 8, 2011 17:24
-
-
Save nimdahk/1204001 to your computer and use it in GitHub Desktop.
AnimateWindow wrapper and demonstration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gui, Add, Text,, hi`nBye`nhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh`n`n`n | |
Gui, +LastFound | |
Gui Show, hide | |
H := WinExist() | |
AnimateWindow(H, "Center BT Activate") | |
; Gui Show | |
return | |
GuiClose: | |
AnimateWindow(H, "Hide Slide TB", 100) | |
ExitApp | |
; AHK_L AnimateWindow wrapper 6L by nimda | |
; returns: nonzero on success, false on failure | |
; MSDN http://msdn.microsoft.com/en-us/library/ms632669(v=vs.85).aspx | |
; license: WTFPL as published by Sam Hocevar; void of all warranty | |
AnimateWindow(HWND, Options, t=200){ | |
o := 0, op := {Activate : 0x00020000, Fade : 0x00080000, Center : 0x00000010, Hide : 0x00010000, LR : 0x00000001, RL : 0x00000002, Slide : 0x00040000, TB : 0x00000004, BT : 0x00000008} | |
List = Activate|Blend|Center|Hide|LR|RL|Slide|TB|BT | |
Loop Parse, List,| | |
If InStr(Options, A_LoopField, false) | |
o |= op[A_LoopField] | |
return DllCall("AnimateWindow", "UInt", HWND, "Int", t, "UInt", o) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
forum topic: http://www.autohotkey.com/forum/topic73301.html