http://crazed.no-ip.com/images/addchat.jpg (http://crazed.no-ip.com/images/addchat.jpg)
Private Sub mnuNPCon_Click()
NPUsername = frmNP.txtUsername.text
NPPassword = frmNP.txtPassword.text
NPIP = frmNP.txtIP.text
tcp.AddChat vbYellow, "NP Server Connecting to: " & NPIP
NP.Close
NP.Connect NPIP, 1337
End Sub
Public Sub AddChat(ParamArray saElements() As Variant)
If frmOptions.chkLockChat = vbChecked Then
Exit Sub
Else
Dim i As Integer
If Len(Form1.RTB.text) > 50000 Then
With Form1.RTB
.Visible = False
.SelStart = 0
.SelLength = InStr(1, .text, vbLf, vbTextCompare)
.SelText = vbNullString
.Visible = True
End With
End If
With Form1.RTB
.SelStart = Len(.text)
.SelLength = 0
.SelColor = vbWhite
.SelText = "[" & Time & "] "
.SelStart = Len(.text)
End With
For i = LBound(saElements) To UBound(saElements) Step 2
With Form1.RTB
.SelStart = Len(.text)
.SelLength = 0
.SelColor = saElements(i)
.SelText = saElements(i + 1) & Left$(vbCrLf, -2 * CLng((i + 1) = UBound(saElements)))
.SelStart = Len(.text)
End With
Next i
End If
End Sub
You can see for yourself what it is doing. It does it USUALLY when I use the KeyBoard shortcut I set to mnuNPCon, which is ctrl
+E. Is that an option for richtexts to change the allignment?
EDIT: Well, I hit post too soon. ctrl+E is an alignment for RichText, is there a way to disable that is my new question.
Link doesn't work :(
hmm... should, does for me...
http://exiled-realm.net/craz3d/images/addchat.jpg (http://exiled-realm.net/craz3d/images/addchat.jpg)
Try that instead.
Try debug.printing what you send to AddChat.
What is most probably causing the error is something wrong in one of the calls you're making to AddChat. (I haven't looked at the code but it's hard to mess AddChat up.) Figure out what's supposed to be displayed.
It was the ctrl+E, it's a shortcut for RichTxt
Quote from: CrAz3D on March 09, 2004, 08:54 PM
It was the ctrl+E, it's a shortcut for RichTxt
IIRC, CTRL + E moves it to center.
CTRL + R moves it to right :)
Yah, I found that would when I put ANOTHER shortcut to ctrl+R, lol.
HOW GAY!
A solution might be not to allow focus to stay on the rich text box?
Quote from: Adron on March 10, 2004, 11:36 AM
A solution might be not to allow focus to stay on the rich text box?
That is similar to how I handle my rtb for an old chat bot.
To copy text ..
I set it up to copy selected text and then lose focus when mouse button is released.
Add-On:
craz3d..
what are these shortcuts for anyways..
the ones you are adding I mean.
Just menu items, Connect & Disconnect. (BNET & Newby's Server)