PDA

Click to See Complete Forum and Search --> : How to scroll text with API


shaykan
Mar 19th, 2001, 08:16 AM
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

KrishnaSantosh
Mar 24th, 2001, 06:56 PM
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