Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Color Codes in VB.NET Coding ?

Status
Not open for further replies.

apexbs

Technical User
Jun 2, 2002
42
0
0
CA
Hi ;

I want to use Color Codes in Programming instead of using color variable which are available in system.drawing.color
class. For example, I want to use #FF6600 for orange and different color codes. I want to change the HeaderBackColor of a Grid in a style in coding.

Thanks.
 
Look at the Color.FromArgb method.

One of the overloads is FromArgb(Red, Green, Blue) which implies an Alpha (transparency) value of 255 - fully opaque.

So in your case Color.FromArgb(&hff, &h66, 0) would give you what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top