How do I get the position of the cursor in a multiline textbox?
Printable View
How do I get the position of the cursor in a multiline textbox?
I'm pretty sure you can use TextBox.SelectionStart property to get the position of the insertion cursor. If you're talking about the mouse cursor, you can use Control.MousePosition static property.
ok I got that now I need to get the x and y of the cursor relative to the main window. And yes I ment the textbox cursor not the windows cursor.
I was thinking of just get the x and y of the textbox curosr than add the x and y of the textboxes upper left cornor. That would make it relative to the main window.