Hi,
Const EM_GETLINECOUNT As Integer = &HBA
Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer
Trace.WriteLine(SendMessage(TextBox1.Handle, EM_GETLINECOUNT, 0, 0))
Ken
-------------------------
Well, Lines says I only have one line cause there aren't any crlf's. But I
want to go by word wrapping.. so the first line before the first word wrap.
And EM_GETLINECOUNT detects word wraps and counts them as lines, even though
all I really have is one long line word wrapped in a textbox that isn't wide
enough. Since EM_GETLINECOUNT detect the number of lines like i wanted, I
assumed that EM_GETLINE would work the same way, and get a line based on
word wrap.