Problem with Fading in & out Window?
Blitz3D Forums/Blitz3D Programming/Problem with Fading in & out Window?
| ||
Hi all. I have a small problem with Fading in a window. I can Fade the program's Window OUT just fine. The problem I'M having is with Fading in the program window while it's hiding so it smoothly transitions in from black fade in. This requires User32.decls be in your 'Blitz3D/Userlibs folder FadeTest.bb: Thanks alot! :) ~GF |
| ||
There is a problem with your constants : AW_SLIDE = AW_HOR_NEGATIVE AW_ACTIVATE = AW_HOR_NEGATIVE AW_BLEND = AW_VER_NEGATIVE Try this : Const AW_SLIDE = $40000 Const AW_ACTIVATE = $20000 Const AW_BLEND = $80000 Const AW_HIDE = $10000 Const AW_CENTER = $00010 Const AW_HOR_POSITIVE = $00001 Const AW_HOR_NEGATIVE = $00002 Const AW_VER_POSITIVE = $00004 Const AW_VER_NEGATIVE = $00008 Graphics 800,600,32,2 SetBuffer BackBuffer() Repeat ; Fade out api_AnimateWindow(SystemProperty$("AppHWND"),1500,AW_HIDE Or AW_BLEND) ; Fade in api_AnimateWindow(SystemProperty$("AppHWND"),1500,AW_BLEND) Until KeyHit(1) End |
| ||
Thanks, Flanker. But I want it to FIRST fade in from nothing. FadeTest.bb: ~GF |
| ||
So basically, the window should be invisible. Then it should slowly Fade In. |
| ||
I've now tried every possible combo of variables to try & make the window fade in. To no avail. ~GF |
| ||
Can someone please help me with a small example of first fading in with a hidden window, then fading out with a visible window? Thank You! ~GF |
| ||
If you already have a function to set the transparency of the window, this may help : http://www.blitzbasic.com/codearcs/codearcs.php?code=3022 |
| ||
How does that help with my current situation? ~GF |
| ||
The fading in fading out part... (if by "fading in" you mean increasing the window alpha until it is fully opaque and by "fading out" you mean decreasing the window alpha until it is fully transparent) |
| ||
Right. |