Jump to content
Sign in to follow this  
t0ddie

make a gui fade?

Recommended Posts

t0ddie

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
Ejoc

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
buzz44

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

qq

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  

×