Sign in to follow this  
Followers 0
t0ddie

make a gui fade?

4 posts in this topic

how would i make a gui fade on and off? (transparent to visible when you open it, and visible to transparent when you close it.)


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



WinSetTrans() maybe?


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

I prefer to use a For...Next loop. With using DllCall(), whilst the window is fading it seems to be in $WS_EX_TOOLWINDOW extended style and then returns to normal. Also if you use the function above and your window transparency is set to something other then 0 ( or 255 depending on what your using) it doesn't fade at all and will just show.

#include <GUIConstants.au3>

$hwnd = GUICreate("My GUI") ; will create a dialog box that when displayed is centered

WinSetTrans ($hwnd , "", 0)
GUISetState ()

For $I = 0 to 255 Step 5
   WinSetTrans($hwnd,"",$I)
   Sleep(1)
Next 

Sleep(2000)

For $I = 255 to 0 Step - 5
   WinSetTrans($hwnd,"",$I)
   Sleep(1)
Next

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0