Skip to content
Home > Programming > ChatSend with Text Color Format

ChatSend with Text Color Format

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #189627
    Johnny5
    Member

    How can you send text to room with color formated?

    #189643

    lol, use a richtextbox, put in the writing u want in the text box, then put ricktextbox1.selcolor = vbred, vbblue, vbgreen or what ever color u want

    #189642
    Johnny5
    Member

    🙂 thank you i’ll try that

    #189641
    Admin
    Administrator

    Yeps, you can do that or add CommonDialog

    like go to projects then components there select microsoft common dialog controls 6.0 then u ad CommonDialog to the form and call it like this on a command button

    CommonDialog1.ShowColor
    RichTextBox1.SelColor = CommonDialog1.Color

    I think is better cause u can select all the colors like thar 😀

    #189640

    sometimes it dunw ork right, like till chatsend one time, then it turns back to black

    #189639
    Admin
    Administrator

    Damn that suks, 🙂

    #189638

    yah, thats why i never released simple age checker with that option, tested it but never worked

    #189637
    Johnny5
    Member

    ‘**************************************************************************
    ‘USAGE:
    ‘ ColorWord (“blue”), vbBlue, 10, True, False
    ‘ ColorWord (“red”), vbRed, 10, True, False
    ‘ ColorWord (“cyan”), vbCyan, 10, True, False
    ‘ ColorWord (“green”), vbGreen, 10, True, False
    ‘ ColorWord (“magenta”), vbMagenta, 10, True, False
    ‘ ColorWord (“yellow”), vbYellow, 10, True, False
    ‘**************************************************************************

    Public Function ColorWord(Swords As String, Scolor As ColorConstants, _
    SFontsize As Integer, Sbold As Boolean, Sitalic As Boolean)
    Dim search&
    search = 1
    Do Until search = 0
    search = InStr(search, frmRTB.rtb.text, Swords, vbTextCompare)
    If search > 0 Then
    With frmRTB.rtb
    .SelStart = search – 1
    .SelLength = Len(Swords)
    .SelColor = Scolor
    .SelFontSize = SFontsize
    .SelBold = Sbold
    .SelItalic = Sitalic
    End With
    search = search + Len(Swords)
    End If
    Loop
    With frmRTB.rtb
    .SelStart = Len(frmRTB.rtb.text)
    .SelColor = vbGreen
    .SelFontSize = 8
    .SelBold = False
    .SelItalic = False
    End With
    End Function

    #189636
    Johnny5
    Member

    for the above function
    if you want to change color on a certain words in the RTB then use the line

    ColorWord (“THIS WORDS IS YELLOW, FONT SIZE 10, BOLD IS TRUE, ITALLIC IS FALSE”), vbYellow, 10, True, False

    #189635
    Johnny5
    Member

    This will send the content of RichTextBox1 Control to paltalk with chatsend function
    call chatsend(RichTextBox1)

    #189634
    Johnny5
    Member

    @UDG_Sk8erboi4490 wrote:

    lol, use a richtextbox, put in the writing u want in the text box, then put ricktextbox1.selcolor = vbred, vbblue, vbgreen or what ever color u want

    I able to get all the words in dif. color but when send to room it wont display and give msg:

    Paltalk: Message was not sent. The message was too long or contained non printable characters.

    why is this happen?

    the text lenght just about 100 char. not that long, it this related to vbCrLf ?

    #189633
    Admin
    Administrator

    i had the same problem with the prankster, does the rtf box look like a space before the text or a line before the text

    another thing is it a fader 🙂

    #189632

    well im thunking they added coding, try putting the richtextbox1.selcolor = red or whatever in forum_load() see if that fixed it, when its in the command line it probably fucks upthe coding that they had and prints the hex varaibles for the colors and everything

    #189631
    Johnny5
    Member

    so! UDG should we use hex color code instead of vbblue, vbgreen, stuff? cause i’ve test the basic of color

    Private Sub colorizeFont()
    r = 255 * Rnd
    g = 255 * Rnd
    b = 255 * Rnd
    RichTextBox1.SelColor = RGB(r, g, b)
    End Sub

    Private Sub RichTextBox1_Change()
    DoEvents
    colorizeFont
    Me.Caption = “(Fun_Font) = Font Color (” & RichTextBox1.SelColor & “)”
    DoEvents
    End Sub

    the above 2 line will change color in RTBox every time entered a key, then use a command button to sent to paltalk

    i’ve test 1 word about 15 chars after that i’t won’t display in PT

    #189630

    well, i suggest u put richtextbox1.selcolor = xxooox or vbred in form_load instead of module liek is aid b4, see if that works, then i would just mess with randomize colors to see if that works instead of one basic color, cause its like the text fader problem we had, less then 2 colors wouldnt send right, may be the same thing for this

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.