I click to textbox which have a string.
How can i determine what character i clickd to it ?
Example : That string is " I am Ann"
I click coordinate contains "m" character. How can i know i click that character.
Thanks for helps.
Printable View
I click to textbox which have a string.
How can i determine what character i clickd to it ?
Example : That string is " I am Ann"
I click coordinate contains "m" character. How can i know i click that character.
Thanks for helps.
try this:
vb Code:
Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown MsgBox(TextBox1.GetCharFromPosition(New Point(e.X, e.Y))) End Sub
GetCharIndexFromPosition