This post originated from an RSS feed registered with .NET Buzz
by Mark Levison.
Original Post: Great WinForms and GDI+ Tricks for spiffing up your application
Feed Title: Mark Levison
Feed URL: /WebLog/error.aspx?aspxerrorpath=/WebLog/mlevison/Rss.aspx
Feed Description: Musings on No Touch Deployment, .NET development and photography
GDI+ alphablending and gradients. Most developers know about gradients, but few realize that gradients can be applied with one or more colors partially opaque (an alpha less than 255). For example by creating a new LinearGradientBrush(rect, Color.FromArgb(128, Colors.White), Color.FromArgb(0, Colors.White), 45) and applying it over the drawing area of a control after painting, you can add pseudo-lighting effects on control. Alphablending and gradients are often used to create gel buttons, often seen in the Macintosh.
I was already using a variation of this, doing it the hard way, on a per element in basis some of my charts. This could give me another tiny speedup.
This Blog Hosted On: http://www.DotNetJunkies.com/