Is there any way I can send a left click event to a TextBox? for what ever the reason although I am doing a TextBox.Focus() and the cursor is blinking inside the TextBox but I cannot start typing in it, But if I do an extra click with the mouse inside the text box then I can start typing. So, I was wondering how to send that event to it?
Is there any way I can send a left click event to a TextBox
Share
To send mouse events, you’ll need to import
user32.dlland usemouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
Example
When using this, you may call
Mouse.sendMouseClick(Point p)to send a mouse left click at the specified point.In your case, I think that you might want to use
Mouse.sendMouseClick(TextBox.Location);to send a mouse left click at the currentTextBoxposition.Thanks,
Have a great day 🙂