Tag Archives: word under mouse

Find the word under the mouse in a RichTextBox control in C#

The following WordUnderMouse method returns the word under the mouse in a RichTextBox. // Return the word under the mouse. private string WordUnderMouse(RichTextBox rch, int x, int y) { // Get the character’s position. int pos = rch.GetCharIndexFromPosition(new Point(x, y)); … Continue reading

Posted in controls, miscellany | Tagged , , , , , , , , , , , | 8 Comments