New topic: 

Fade in Window?

<http://forums.realsoftware.com/viewtopic.php?t=47029>

         Page 1 of 1
   [ 6 posts ]                 Previous topic | Next topic          Author  
Message        RicSum          Post subject: Fade in Window?Posted: Thu Feb 21, 
2013 11:20 pm                         
Joined: Fri Jun 05, 2009 4:54 pm
Posts: 384
Location: London, England                In a post from 2009, a user claimed 
that he has a splash screen which fades in.

Is it possible to make a "ShowModal" window fade in?
If so, can someone point me in the right direction.

It is a Windows app, by the way.

Thank you all in advance.      
_________________
RealStudio Professional Edition 2011 Release 4 & 2012 Release 1.2
Developing on OS X  10.8 (Mountain Lion)
Deploying on Windows XP / 7 / 8  
                             Top                charonn0          Post subject: 
Re: Fade in Window?Posted: Fri Feb 22, 2013 1:23 am                             
    
Joined: Mon Apr 02, 2007 2:08 am
Posts: 1130
Location: San Francisco, CA, USA                If it's Windows only, you can 
use the AnimateWindow function with the AW_BLEND flag in the window's Open 
event:

Sub Open()
  Declare Function AnimateWindow Lib "User32" (HWND As Integer, Time As 
Integer, Flags As Integer) As Boolean
  Const AW_BLEND = &h00080000
  Call AnimateWindow(Me.Handle, 1000, AW_BLEND) '1000 = 1 second animation
End Sub
      
_________________
Boredom Software  
                             Top                RicSum          Post subject: 
Re: Fade in Window?Posted: Fri Feb 22, 2013 2:19 am                         
Joined: Fri Jun 05, 2009 4:54 pm
Posts: 384
Location: London, England                Cool, thanks.

Will this work on win xp, vista, 7, 8 ?

Poop, I meant fade out     
_________________
RealStudio Professional Edition 2011 Release 4 & 2012 Release 1.2
Developing on OS X  10.8 (Mountain Lion)
Deploying on Windows XP / 7 / 8  
                             Top                charonn0          Post subject: 
Re: Fade in Window?Posted: Fri Feb 22, 2013 2:35 am                             
    
Joined: Mon Apr 02, 2007 2:08 am
Posts: 1130
Location: San Francisco, CA, USA                AnimateWindow is supported in 
Windows 2000 and later including Windows 8. To fade out, combine the AW_BLEND 
flag with the AW_HIDE flag using a bit-wise Or operation:

Const AW_HIDE = &h00010000
Const AW_BLEND = &h00080000
Dim combinedflags As Integer = AW_BLEND Or AW_HIDE


And then call AnimateWindow in the window's Close event using the combined 
AW_BLEND and AW_HIDE flags.      
_________________
Boredom Software  
                             Top                HMARROQUINC          Post 
subject: Re: Fade in Window?Posted: Fri Feb 22, 2013 4:01 am                    
             
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 457
Location: Guatemala, Central America                Just in case you missed 
this from charonn0 link:


AW_BLEND and window alpha blending
AW_BLEND does not work on a window with alpha blending enabled (translucent). 
The window shows or hide without animation (although you need to wait for the 
time to elapse for the function to return). Once the function returns, alpha 
blending is disabled on the window and animation works normally on further 
calls to the function.

Another post claims that it doesn't work wuth the aero theme either.      
_________________
Future RS guru.
Ride the world!  
                             Top                RicSum          Post subject: 
Re: Fade in Window?Posted: Fri Feb 22, 2013 4:08 am                         
Joined: Fri Jun 05, 2009 4:54 pm
Posts: 384
Location: London, England                Oh poop !

Guess I will just have it open and close normally then     
_________________
RealStudio Professional Edition 2011 Release 4 & 2012 Release 1.2
Developing on OS X  10.8 (Mountain Lion)
Deploying on Windows XP / 7 / 8  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 6 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to