Function Help: QBColor()
Posted: Wed Nov 03, 2004 10:07 pm
Okay, Jake might know what I\'m doing but a lot of others don\'t so here goes..
I have this RichTextBox control and well I\'m using "QBColor(<insert number>)" for changing of colors and I have parsed the \'short motd\' from the PSO server into this:
Now the ones with "<CODE>" are the ones I don\'t have the colors for yet, but that\'s not important..
The "Data" is the IRC data that is recieved.. So in the Winsock data arrival event I just put the following to replace the data and all that good stuff
and do note this is right after Winsock1.GetData Data, vbString...
I think that\'s all the code I need to give you and now the question:
Why is it putting numbers there instead of putting colors?
Thanks in advance (Sorry for really humungo post <img src=\'http://www.killanet.net/forum3/public/s ... >/blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />)
~Josh <img src=\'http://www.killanet.net/forum3/public/s ... sp_ike.gif\' class=\'bbc_emoticon\' alt=\'(spike)\' />
I have this RichTextBox control and well I\'m using "QBColor(<insert number>)" for changing of colors and I have parsed the \'short motd\' from the PSO server into this:
Now if you look at where the "/msg memoserv,chanserv,nickserv help" is there is a number.. This number is QBColor(6) (which is purple by the way) yet it should work for changing colors because this is my coding for the replacement of the raw code for color codes on the IRC Protocol:- 2/10/2004 13
- This is the short MOTD. To view the complete MOTD type /motd
-
- Welcome to irc.isyourgod.com!
-
- ****************************************************
- Services Available
- * MemoServ - Memo Server ( 32896/msg memoserv help0 for info )
- * ChanServ - Channel Server ( 32896/msg chanserv help0 for info )
- * NickServ - Nickname Server ( 32896/msg nickserv help0 for info )
- * To View Server Rules ( 32896/rules )
-
- ****************************************************
Code: Select all
Function DefineColors()
Status.SelColor = QBColor(0)
Data = Replace(Data, "10", "<CODE>")
Data = Replace(Data, "11", QBColor(11))
Data = Replace(Data, "12", QBColor(9))
Data = Replace(Data, "13", QBColor(13))
Data = Replace(Data, "14", QBColor(8))
Data = Replace(Data, "15", QBColor(7))
Data = Replace(Data, "0", QBColor(15))
Data = Replace(Data, "1", QBColor(0))
Data = Replace(Data, "2", QBColor(2))
Data = Replace(Data, "3", QBColor(3))
Data = Replace(Data, "4", QBColor(12))
Data = Replace(Data, "5", QBColor(5))
Data = Replace(Data, "6", QBColor(6))
Data = Replace(Data, "7", "<CODE>")
Data = Replace(Data, "8", "<CODE>")
Data = Replace(Data, "9", QBColor(10))
Data = Replace(Data, "", QBColor(0))
Data = Replace(Data, "", "")
Data = Replace(Data, "", "")
End FunctionThe "Data" is the IRC data that is recieved.. So in the Winsock data arrival event I just put the following to replace the data and all that good stuff
Code: Select all
DefineColorsI think that\'s all the code I need to give you and now the question:
Why is it putting numbers there instead of putting colors?
Thanks in advance (Sorry for really humungo post <img src=\'http://www.killanet.net/forum3/public/s ... >/blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />)
~Josh <img src=\'http://www.killanet.net/forum3/public/s ... sp_ike.gif\' class=\'bbc_emoticon\' alt=\'(spike)\' />