Anyone know how i can control a certain no. of lines in the rich text box controls? just like the telnet window for Windows.
Printable View
Anyone know how i can control a certain no. of lines in the rich text box controls? just like the telnet window for Windows.
this code has been posted by megatron a while ago,, this is for text boxes, i don't knowif it works with rich text boxes:
Code:Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINECOUNT = &HBA
Private Sub Command1_Click()
Dim iLines As Integer
iLines = SendMessage(Text1.hwnd, EM_GETLINECOUNT, 0, 0)
MsgBox ("There are " & iLines & " lines in Text1")
End Sub
well, i think i was wrong, i though that u asked about the no. of lines in a rich text box,,,sorry