Thanks for that, but it didn't work.
EM_GETLINECOUNT is empty if that helps.
I've only got VB5 mind, does that use VB6 stuff?
Printable View
Thanks for that, but it didn't work.
EM_GETLINECOUNT is empty if that helps.
I've only got VB5 mind, does that use VB6 stuff?
I've thought of a way of doing it, its pritty simple.
I take whats left of the .selstart, and check how many carrage returns there are.
The problem is I dont know how to check for how many carrage returns there are.
I didn't notice that you were using the RichTextBox Control.
Here is the simplest way to tell what line the cursor is on.
VB Code:
Private Sub RichTextBox1_Change() 'Add 1 so that it starts on line 1 instead of line 0 Caption = RichTextBox1.GetLineFromChar(RichTextBox1.SelStart) + 1 End Sub
Cheers dude, works great!