Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader





View Nannette  Thacker's profile on LinkedIn

August 2010 - Posts

Using a Hexadecimal color instead of a System.Drawing.Color

A colleague asked me how to use a hexademical color on an object that requires a System.Drawing.Color. It's quite simple and I thought I'd share it.

As an example, you may define a background color using the System.Drawing.Color:

panRow.BackColor = Drawing.Color.Red

But you want a custom color, so you may instead use the ColorTranslator and define the Hex value: 

panRow.BackColor = System.Drawing.ColorTranslator.FromHtml("#FF5B5B")

This is true of all controls that require a System.Drawing.Color.

May your dreams be in ASP.NET!

Nannette

Shining Star Services LLC on LinkedIn

Posted: Aug 18 2010, 03:30 PM by nannette | with 3 comment(s)
Filed under:
Find me on LinkedIn....

Find Nannette on LinkedIn.


Shining Star Services LLC on LinkedIn
More Posts