I'm Trying to call "AnimateWindow" From User32.dll, And Although it is calling the Function, It dosn't seem to be Animating it at all, Can anyone see why its not working?
SetupDLLs: GLOBAL DLL_User32 AS INTEGER : DLL_User32 = FindFreeDLL() : LOAD DLL "User32.dll" ,DLL_User32
GLOBAL DLL_ComCtl32 AS INTEGER : DLL_ComCtl32 = FindFreeDLL() : LOAD DLL "ComCtl32.dll" ,DLL_ComCtl32 : CALL DLL DLL_ComCtl32,"InitCommonControls"
GLOBAL DLL_GDI32 AS INTEGER : DLL_GDI32 = FindFreeDLL() : LOAD DLL "GDI32.dll" ,DLL_GDI32
GLOBAL DLL_Kernel32 AS INTEGER : DLL_Kernel32 = FindFreeDLL() : LOAD DLL "Kernel32.dll" ,DLL_Kernel32
GLOBAL DLL_Shell32 AS INTEGER : DLL_Shell32 = FindFreeDLL() : LOAD DLL "Shell32.dll" ,DLL_Shell32
GLOBAL DLL_WinLock AS INTEGER : DLL_WinLock = FindFreeDLL() : LOAD DLL "WinLockDll.dll",DLL_WinLock
GLOBAL DLL_UxTheme AS INTEGER : DLL_UxTheme = FindFreeDLL() : LOAD DLL "UxTheme.dll" ,DLL_UxTheme
DBWin = CALL DLL(DLL_User32,"GetActiveWindow")
AnimateWindow(DBWin,6,500)
Do
Sync : Loop
FUNCTION AnimateWindow(Handle,Effect,Time) : ` Set Animation Effects When Opening/Closing the Window
IF Effect = 1 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H1" ) : ExitFunction : ` AW_HOR_POSITIVE = Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
IF Effect = 2 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H2" ) : ExitFunction : ` AW_HOR_NEGATIVE = Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
IF Effect = 3 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H4" ) : ExitFunction : ` AW_VER_POSITIVE = Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
IF Effect = 4 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H8" ) : ExitFunction : ` AW_VER_NEGATIVE = Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
IF Effect = 5 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H10" ) : ExitFunction : ` AW_CENTER = Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. The various direction flags have no effect.
IF Effect = 6 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H40000") : ExitFunction : ` AW_SLIDE = Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER.
IF Effect = 7 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H20000") : ExitFunction : ` AW_ACTIVATE = Activates the window. Do not use this value with AW_HIDE.
IF Effect = 8 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H80000") : ExitFunction : ` AW_BLEND = Uses a fade effect. This flag can be used only if hwnd is a top-level window.
IF Effect = 9 THEN Result = CALL DLL(DLL_User32,"AnimateWindow",Handle,Time,"&H10000") : ExitFunction : ` AW_HIDE = Hides the window. By default, the window is shown.
ENDFUNCTION
According to MSDN it should give 9 Different Animation Effects for Window
http://msdn2.microsoft.com/en-us/library/ms632669(VS.85).aspx
Everyone Be Cool, You, Be Cool.