Send key code to the control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I need to sent key code (for example, like enter) to the textbox control. I need to simulate press key. i think , solution can be by firing message, but i don't know how....


Thanks a lot.
 
You can use the Win32 SendMessage/PostMessage API, use WM_KEYDOWN, WM_KEYUP.
 
You can use System.Windows.Forms.SendKeys.Send method.
USAGE:
using System.Windows.Forms;

SendKeys.Send("{ENTER}")

Nadav said:
You can use the Win32 SendMessage/PostMessage API, use WM_KEYDOWN, WM_KEYUP.
control. I need to simulate press key. i think , solution can be by firing
message, but i don't know how....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top