Advertisement

07.02.2008 at 04:12PM PDT, ID: 23535436
[x]
Attachment Details

(web app) translating color from winform to web app

Asked by Farzadw in Microsoft Visual Basic.Net

Tags: VB.Net

I have an app that saves colors like this: 33023  instead of #FFFFFF

I need to translate this color to #xxxxxx format AND vice versa.
These 2 lines of code work:

'gives me ffff8000
Dim winColor As System.Drawing.Color = System.Drawing.ColorTranslator.FromWin32(33023)

'gives me #FF8000
Dim winColor1 As String = System.Drawing.ColorTranslator.ToHtml(winColor)

*** Now, i need to reverse that and get 33023 back. I tried this and it didnt work:
Dim winColor2 As String = System.Drawing.ColorTranslator.FromHtml(winColor1)

How can I do this??
Start Free Trial
[+][-]07.02.2008 at 05:07PM PDT, ID: 21921846

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: VB.Net
Sign Up Now!
Solution Provided By: torimar
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.02.2008 at 05:08PM PDT, ID: 21921853

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 05:09PM PDT, ID: 21921855

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628