Windows Forms: SelectionChanged event for TextBox class
You can use TextBox also.
Write a function GetMyPosition() and put in the events
- TextChanged()
- MouseClick()
- KeyUp() (In KeyDown() the position isn't changed)
When you want to notify the highlighting of a text, you also have to use
- MouseHover()
You could use a RichTextBox and set Multiline to false. It has a OnSelectionChanged.
Well, I guess this may help! You will need to use RichTextBox still.