Board index » cppbuilder » AlphaBlend and Transparency

AlphaBlend and Transparency


2007-11-06 04:07:59 AM
cppbuilder56
I use AphaBlend on one of my main forms so it gracefully fades away on FormClose.
Can this effect be realized when the form is initialized? Where would the code go?
Nate
 
 

Re:AlphaBlend and Transparency

"Nate Lockwood" < XXXX@XXXXX.COM >wrote in message
Quote
Can this effect be realized when the form is initialized?
Yes.
Quote
Where would the code go?
Set the AlphaBlendValue property to 0 intially, then use a TTimer to
increment the value until the form is fully visible.
Gambit
 

Re:AlphaBlend and Transparency

1) You can set AlphaBlendValue to 0 at design time and add a timer to the
form. In the timer's event handler increment the AlphaBlendValue until it
gets to the desired value and then disabled the timer.
2) You can add an event handler for OnShow and then post a custom message
(eg. UM_AFTER_SHOW). In the handler for the custom message you can perform
the same functionality as you do in your OnClose handler.
Clayton
 

{smallsort}