I am using RichTextBox and I am looking for API that will get line number and will scroll the text to the line position.
Thanx
VB6 SP4
Printable View
I am using RichTextBox and I am looking for API that will get line number and will scroll the text to the line position.
Thanx
VB6 SP4
Try This
Private Const EM_GETLINECOUNT = &HBA
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 Sub Command1_Click()
Label1.Caption = SendMessage(Text1.hwnd, EM_GETLINECOUNT, 2&, 0)
End Sub