Re: control fade



Hi, i've 2 PictureBox control containing other controls such as
buttons,labels ecc...

One stay at the top of the other....now when user clicks a button, i
want to fade from one to another...

I've tried AlphaBlend but only background and image in the picture box
are faded not buttons and other controls???

You have two options; the first is to use layered windows and fade the new one in on top of the first, and the second is
to capture both windows by getting them to paint themselves to two back-buffers (with their respective child controls)
and perform your AlphaBlend() between them.
For the former option you can use the SetLayeredWindowAttributes()/UpdateLayeredWindow() API calls, the latter would
require you to send WM_PRINT/PAINT messages to your windows. Have a look here for an example of how to send these
messages around:
http://groups.google.co.uk/group/microsoft.public.vb.winapi.graphics/msg/03903b7ac0a50e1f
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/


.


Loading