How do I get the position of the cursor in a multiline textbox?
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.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
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.
Last edited by Rune Hunter; 12-10-2005 at 10:53 AM.