Posted By

rengber on 02/15/07


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Send a KeyPress Event to a Windows Form

 / Published in: C#


This was obvious once I found the class responsible, but took quite a bit of searching to locate. MSDN article has the code strings for the non-visible characters.

  1. private void btnDeleteRows_Click(object sender, System.EventArgs e)
  2. {
  3. dataGrid1.Focus();
  4. SendKeys.Send("{DELETE}");
  5. }

Report this snippet  

You need to login to post a comment.