Author | Message | Time |
---|---|---|
CrAz3D | http://crazed.no-ip.com/images/addchat.jpg [code]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[/code] [code]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[/code] 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. | March 9, 2004, 7:30 PM |
SNiFFeR | Link doesn't work :( | March 9, 2004, 8:35 PM |
CrAz3D | March 9, 2004, 8:36 PM | |
Stealth | 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. | March 9, 2004, 11:41 PM |
CrAz3D | It was the ctrl+E, it's a shortcut for RichTxt | March 10, 2004, 2:54 AM |
Newby | [quote author=CrAz3D link=board=31;threadid=5695;start=0#msg48658 date=1078887282] It was the ctrl+E, it's a shortcut for RichTxt [/quote] IIRC, CTRL + E moves it to center. CTRL + R moves it to right :) | March 10, 2004, 2:47 PM |
CrAz3D | Yah, I found that would when I put ANOTHER shortcut to ctrl+R, lol. HOW GAY! | March 10, 2004, 3:31 PM |
Adron | A solution might be not to allow focus to stay on the rich text box? | March 10, 2004, 5:36 PM |
o.OV | [quote author=Adron link=board=31;threadid=5695;start=0#msg48736 date=1078940162] A solution might be not to allow focus to stay on the rich text box? [/quote] 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. | March 11, 2004, 2:39 AM |
CrAz3D | Just menu items, Connect & Disconnect. (BNET & Newby's Server) | March 11, 2004, 2:59 AM |