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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

color toargb and fromargb

Status
Not open for further replies.

griffitd

Programmer
Aug 20, 2002
189
GB
Hi I have the following code

Dim cFromColour As Color
Dim sFromColour As String = "Cyan"
Dim iFromInt As Integer = 0

Dim cToColour As Color
Dim sToColour As String

cFromColour = System.Drawing.Color.FromName(CStr(sFromColour))
iFromInt = cFromColour.ToArgb

cToColour = Color.FromArgb(iFromInt)
sToColour = cToColour.Name

iFromInt = -16711681

when I do the fromargb

cToColour = "{Name=ff00ffff, ARGB=(255, 0, 255, 255)}"

and not cyan

Can anyone help please

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top