Posted By

rengber on 02/15/07


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
vali29


Send a KeyPress Event to a Windows Form


 / Published in: C#
 

URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsSendKeysClassTopic.asp

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.