Jump to content

make a gui fade?


Recommended Posts

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.

Link to comment
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

qq

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...