Creating Transparent Forms


A new property of forms that I think is very cool is the Opacity property. This property controls the opaqueness of the form as well as all controls on the form. The default Opacity value of 100% means that the form and its controls are completely opaque (solid), whereas a value of 0% creates a completely transparent form (no real point in that). A value of 50% then, creates a form that's between solid and invisible as shown in Figure 6.17. Microsoft Outlook 2003 and newer makes good use of opacity in its alerts that pop up to tell you when you've received an email. The Opacity of these alerts is cycled from 0 to 100, left at 100 for a short time, and then cycled back down to 0 as it disappears. You can do this in your program using a simple loop as discussed in Hour 14, "Looping for Efficiency."

Figure 6.17. Ghost forms!





Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net