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 lines As Long lines = SendMessage(RichTextBox1.hwnd, EM_GETLINECOUNT, 0, 0) End Sub




Reply With Quote