zcoacoaz Posted April 11, 2005 Share Posted April 11, 2005 look at what i came across on msdn its pretty cool $hwnd = GUICreate ( "Blend test", 300, 300 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000 ) GUISetState ( ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040001 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040004 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040008 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040005 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040006 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040009 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0004000a ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1, "long", 0x00090000 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040010 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050010 ) Parsix 1 [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
layer Posted April 11, 2005 Share Posted April 11, 2005 (edited) eww, no fair i was going to do that... before i saw that dllcall though, i made this as an alternave for the fading window..Func _WinFade($WinTitle, $Style) Local $WinTitle, $Style, $in, $out If $Style = 1 Then For $in = 0 to 255 step +5; step +5 may be too much or too little? cant tell, my computer doesnt like transparency.. WinSetTrans($WinTitle, "", $in) Next EndIf If $Style = 0 Then For $out = 255 to 0 step +5 WiNSetTrans($WinTitle, "", $out) Next EndIf EndFunca little dirty, but oh well good work eh EDIT: Question... Now I remeber why I couldn't get it to work, I didn't have any values, I was trying to use the words, like "AW_BLEND". So I'm wondering, where did you get those values for it? Thanks! Edited April 11, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
Smed Posted April 11, 2005 Share Posted April 11, 2005 @Xenogis, yah cool.@layer, They're in winuser.h#define AW_HOR_POSITIVEÂ Â Â Â Â Â 0x00000001#define AW_HOR_NEGATIVEÂ Â Â Â Â Â 0x00000002#define AW_VER_POSITIVEÂ Â Â Â Â Â 0x00000004#define AW_VER_NEGATIVEÂ Â Â Â Â Â 0x00000008#define AW_CENTERÂ Â Â Â Â Â Â Â Â 0x00000010#define AW_HIDEÂ Â Â Â Â Â Â Â Â Â 0x00010000#define AW_ACTIVATEÂ Â Â Â Â Â Â Â 0x00020000#define AW_SLIDEÂ Â Â Â Â Â Â Â Â Â 0x00040000#define AW_BLENDÂ Â Â Â Â Â Â Â Â Â 0x00080000 601DisengageEnd Program Link to comment Share on other sites More sharing options...
layer Posted April 12, 2005 Share Posted April 12, 2005 ohhh thanks Smed! FootbaG Link to comment Share on other sites More sharing options...
buzz44 Posted April 12, 2005 Share Posted April 12, 2005 (edited) Here's another way for those of you who don't want to use DllCall()expandcollapse popup$hwnd = GUICreate ( "Blend test", 300, 300 ) WinSetTrans($hwnd, "", 0) GUISetState ( ) For $I = 0 To 255 Step + 5 WinSetTrans($hwnd, "", $I) Sleep(10) Next; fade-in Sleep(1000) For $I = 255 To 0 Step - 5 WinSetTrans($hwnd, "", $I) Sleep(10) Next; fade-out Sleep(1000) WinSetTrans($hwnd, "", 255) For $I = 0 To 300 Step + 5 WinMove ( "Blend test", "", 250, 150, $i,300) Sleep(10) Next; slide-in from left Sleep(1000) For $I = 300 To 0 Step - 5 WinMove ( "Blend test", "", 250, 150, $i,300) Sleep(10) Next; slide-out from left Sleep(1000) $p = 0 For $I = 550 To 250 Step - 5 WinMove ( "Blend test", "", $I, 150, $p, 300) $p = $p + 5 Sleep(10) Next; slide-in from right Sleep(1000) $p = 300 For $I = 250 To 550 Step + 5 WinMove ( "Blend test", "", $I, 150, $p, 300) $p = $p - 5 Sleep(10) Next; slide-out from left Sleep(1000) For $I = 0 To 300 Step + 5 WinMove ( "Blend test", "", 250, 150, 300, $I) Sleep(10) Next; slide-in from top Sleep(1000) For $I = 300 To 0 Step - 5 WinMove ( "Blend test", "", 250, 150, 300, $I) Sleep(10) Next; slide-out from top Sleep(1000) $p = 0 For $I = 450 To 150 Step - 5 WinMove ( "Blend test", "", 250, $I, 300, $p) $p = $p + 5 Sleep(10) Next; slide-in from bottom Sleep(1000) $p = 300 For $I = 150 To 450 Step + 5 WinMove ( "Blend test", "", 250, $I, 300, $p) $p = $p - 5 Sleep(10) Next; slide-out from bottom Sleep(1000) For $I = 0 To 300 Step + 5 WinMove ( "Blend test", "", 250, 150, $i,$i) Sleep(10) Next; diag slide-in from top-left Sleep(1000) For $I = 300 To 0 Step - 5 WinMove ( "Blend test", "", 250, 150, $i,$i) Sleep(10) Next; diag slide-out from top-left Sleep(1000) $p = 0 For $I = 550 To 250 Step - 5 WinMove ( "Blend test", "", $I, 150, $p, $p) $p = $p + 5 Sleep(10) Next; diag slide-in from top-right Sleep(1000) $p = 300 For $I = 250 To 550 Step + 5 WinMove ( "Blend test", "", $I, 150, $p, $p) $p = $p - 5 Sleep(10) Next; diag slide-out from top-right Sleep(1000) $p = 0 For $I = 450 To 150 Step - 5 WinMove ( "Blend test", "", 250, $I, $p, $p) $p = $p + 5 Sleep(10) Next; diag slide-in from bottom-left Sleep(1000) $p = 300 For $I = 150 To 450 Step + 5 WinMove ( "Blend test", "", 250, $I, $p, $p) $p = $p - 5 Sleep(10) Next; diag slide-out from bottom-left Sleep(1000) $p = 0 For $I = 550 To 250 Step - 5 $z = $i - 100 WinMove ( "Blend test", "", $I, $z, $p, $p) $p = $p + 5 Sleep(10) Next; diag slide-in from bottom-right Sleep(1000) $p = 300 For $I = 250 To 550 Step + 5 $z = $i - 100 WinMove ( "Blend test", "", $I, $z, $p, $p) $p = $p - 5 Sleep(10) Next; diag slide-out from bottom-right Sleep(1000) $Width = @DesktopWidth / 2 For $I = 0 To 300 Step + 5 $Left = @DesktopWidth / 2 - $I / 2 $Top = $Left - 100 WinMove ( "Blend test", "", $Left, $Top, $I, $I) Sleep(10) Next; explode Sleep(1000) For $I = 300 To 0 Step - 5 $Left = $Width - $I / 2 $Top = $Left - 100 WinMove ( "Blend test", "", $Left, $Top, $I,$I) Sleep(10) Next; implode Sleep(1000)For the explode and implode effects... The syntax is correct and it should be a width/height of 300, but for some strange reason its not. It was just a little too small and thats why I added $I * 1.02 etc to get the window size correct .Edit: I just realised that all the windows are slightly shorter then there supposed to be... weird. I have now removed the $I * blah from the above code. Edited April 12, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 12, 2005 Author Share Posted April 12, 2005 $hwnd = GUICreate ( "Slidin' Window", 300, 300 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040004 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050004 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040008 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050008 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040001 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050002 ) this one keeps sliding until it dissapears again [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
datkewlguy Posted May 20, 2005 Share Posted May 20, 2005 this is really cool, but how would you say make it start off the screen, slide to the right, stop, and then slide off again? i cant get it to slide on... Link to comment Share on other sites More sharing options...
buzz44 Posted May 21, 2005 Share Posted May 21, 2005 $hwnd = GUICreate ( "Blend test", 300, 300 ) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002 ) Sleep(1500) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001 ) GUISetState ( ) Sleep(1000)Some of them require you to use DllCall() before GUISetState(). qq Link to comment Share on other sites More sharing options...
Randeniya Posted July 14, 2009 Share Posted July 14, 2009 Very useful For Desktop. Link to comment Share on other sites More sharing options...
Ashalshaikh Posted July 15, 2009 Share Posted July 15, 2009 Good ,, Thank YOu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now