Author | Message | Time |
---|---|---|
EviL_MarinE | Hey, i want to do: [code] If Left(Text1.Text, 1) <> "/" Then Display ChatRoom, True, True, vbCyan, "<" & frmLogin.txtUsername & "> " & vbWhite, Text1.Text [/code] But i get the error: "Wrong number of Arguements Or invalid Property Assigment" I think its to do with the Display function and im not saying for it to do 2 colours, well heres my display function: [code] Public Function Display(ByVal TextObject As RichTextBox, ByVal NewLine As Boolean, ByVal TimeStamp As Boolean, ByVal TextColor As Long, ByVal Text As String) TextObject.SelStart = Len(TextObject.Text) If NewLine = True And TextObject.Text <> "" Then TextObject.SelText = TextObject.SelText & vbCrLf If TimeStamp = True Then TextObject.SelColor = &H8000000F TextObject.SelText = TextObject.SelText & "=[" & Time & "]= " End If TextObject.SelColor = TextColor TextObject.SelText = TextObject.SelText & Text TextObject.SelStart = Len(TextObject.Text) End Function [/code] If any1 could reply with what i shud add to let it do 2 colours in one line, i will great thank them! | October 24, 2004, 6:26 PM |
shadypalm88 | [quote author=EviL_MarinE link=topic=9299.msg85929#msg85929 date=1098642374] [quote]If Left(Text1.Text, 1) <> "/" Then Display ChatRoom, True, True, vbCyan, "<" & frmLogin.txtUsername & "> " [u]& vbWhite, Text1.Text[/u][/quote][/quote]You can't do that with yours. You're displaying the person's username and the code for the color white in [color=cyan]cyan[/color], and then an extra argument (that has no place to go) containing the text. You'll need to do: [code]If Left(Text1.Text, 1) <> "/" Then Display ChatRoom, True, True, vbCyan, "<" & frmLogin.txtUsername & "> " Display ChatRoom, False, False, vbWhite, Text1.Text End If[/code] | October 24, 2004, 7:03 PM |
EviL_MarinE | Wowoowowow thanks it worked love ya dude ;) | October 24, 2004, 7:11 PM |