From Color to Hex (REALbasic getting started Mailinglist archive)

Back to the thread list
Previous thread: Of Palletes & Windows & Flow Control
Next thread: No Ellipse, Please


RB Database   -   tom.russell transport.alstom.com
  From Color to Hex   -   Tristan
   Re: From Color to Hex   -   Terry Ford
    RE: From Color to Hex   -   Carlos M
     Re: From Color to Hex   -   Tristan

From Color to Hex
Date: 13.01.07 02:43 (Fri, 12 Jan 2007 19:43:39 -0600)
From: Tristan
Is there any way that I can get the hex value of a color then pass it
into a string?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: From Color to Hex
Date: 13.01.07 03:00 (Fri, 12 Jan 2007 18:00:47 -0800)
From: Terry Ford

On Jan 12, 2007, at 5:43 PM, Tristan wrote:

> Is there any way that I can get the hex value of a color then pass
> it into a string?

The easiest way I know is to use a Variant to convert it for you.

Dim s As String
Dim c As Color,FF00FF
Dim v As Variant
vÀsm
s should now contain "&hFF00FF"

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

RE: From Color to Hex
Date: 13.01.07 03:19 (Sat, 13 Jan 2007 02:19:09 -0000)
From: Carlos M
On Jan 13, 2007 2:01 AM, Terry Ford wrote:
> On Jan 12, 2007, at 5:43 PM, Tristan wrote:
> > Is there any way that I can get the hex value of a color then pass
> > it into a string?
>
> The easiest way I know is to use a Variant to convert it for you.
>
> Dim s As String
> Dim c As Color,FF00FF
> Dim v As Variant
> vÀ> sr>
> s should now contain "&hFF00FF"

Or just using CStr:
Dim s As String
Dim c As ColormFF00FF
s ,Str(c)

Carlos
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: From Color to Hex
Date: 13.01.07 04:28 (Fri, 12 Jan 2007 21:28:19 -0600)
From: Tristan
Thank you all. Will use Cstr.
On Jan 12, 2007, at 8:19 PM, Carlos M wrote:

> On Jan 13, 2007 2:01 AM, Terry Ford wrote:
>> On Jan 12, 2007, at 5:43 PM, Tristan wrote:
>>> Is there any way that I can get the hex value of a color then pass
>>> it into a string?
>>
>> The easiest way I know is to use a Variant to convert it for you.
>>
>> Dim s As String
>> Dim c As Color,FF00FF
>> Dim v As Variant
>> vÀ>> sw>>
>> s should now contain "&hFF00FF"
>
> Or just using CStr:
> Dim s As String
> Dim c As Color|FF00FF
> s nStr(c)
>
> Carlos
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>





Links
MBS Realbasic tutorial videos - Christians Software aus Nickenich