|
-
Mar 26th, 2003, 05:32 PM
#1
Thread Starter
Fanatic Member
HTML Color
I found this code on the forum and it's working great, but I can't really understand its functionality. This code converts Color values as used by VB to HTML Colors (certain kind of Hexadecimal colors). Does somebody have a code that does the opposite; convert HTML Colors to VB understandable code?
Thx 
[edit]o ****, posted it in Chit Chat... can a mod kick this to the VB General Questions?[/edit]
VB Code:
Public Function ColorHTML(Number As Long) As String
Dim MyString As String, MyNum As Long, MyCalc As Long, MyRemainder As Long, X As Integer
MyRemainder = Number
MyString = ""
For X = 2 To 0 Step -1
MyCalc = MyRemainder \ 256 ^ X
MyString = Format$(Hex(MyCalc), "00") & MyString
MyRemainder = MyRemainder - MyCalc * 256 ^ X
Next
txtColor.Text = MyString
End Function
-
Mar 27th, 2003, 12:14 AM
#2
PowerPoster
Typical, uneducated yank.
Its colour! Not Color.
-
Mar 27th, 2003, 08:07 AM
#3
Thread Starter
Fanatic Member
Hey, I'm not a yank! I'm Dutch and I know perfectly well the difference between British and American English. I've chosen the American word for colour because it's internationally accepted.
Oh, and since you give yourself the privilege of guessing my form of education, I am absolutely not uneducated; I've just finished grammar school...
-
Mar 27th, 2003, 09:54 PM
#4
Fanatic Member
I think he was joking
-
Mar 28th, 2003, 12:07 AM
#5
PowerPoster
Originally posted by siyan
I think he was joking
Ssssh!!
-
Mar 28th, 2003, 05:06 AM
#6
Thread Starter
Fanatic Member
Now kick this thing to General VB Questions then...
-
Mar 28th, 2003, 05:40 AM
#7
PowerPoster
-
Mar 28th, 2003, 09:25 AM
#8
Retired VBF Adm1nistrator
*BOF* broken nose 
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 29th, 2003, 01:37 AM
#9
PowerPoster
-
Mar 29th, 2003, 08:11 PM
#10
Fanatic Member
Whatarecolors??Pleaseexplainthemtome.
Don't pay attention to this signature, it's contradictory.
-
Mar 29th, 2003, 11:17 PM
#11
Fanatic Member
Originally posted by alkatran
Whatarecolors??Pleaseexplainthemtome.
I hope you used a script/proggie to do that.
-
Mar 29th, 2003, 11:45 PM
#12
PowerPoster
Lets hope so.
-
Mar 29th, 2003, 11:54 PM
#13
Frenzied Member
Originally posted by Pc_Madness
Lets hope so.
Ohhedid.VeryfewpeoplehaveTHATmuchtimeontheirhands.
You just proved that sig advertisements work.
-
Mar 30th, 2003, 01:53 AM
#14
PowerPoster
S o m e P eople can't be bothered to get a prog to do all of those silly colour things.
-
Mar 30th, 2003, 03:03 AM
#15
Frenzied Member
You just proved that sig advertisements work.
-
Mar 30th, 2003, 08:14 AM
#16
Fanatic Member
Isawapostsayingsomethingaboutdoingstuffinvbforum...(byanadministrator)
dledtheprogramandfoundthisnicerainbowoption;)
Don't pay attention to this signature, it's contradictory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|