Results 1 to 3 of 3

Thread: Richtextbox line controls

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Posts
    6
    Anyone know how i can control a certain no. of lines in the rich text box controls? just like the telnet window for Windows.

  2. #2
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    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

  3. #3
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    well, i think i was wrong, i though that u asked about the no. of lines in a rich text box,,,sorry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width