Return to Snippet

Revision: 2433
at February 15, 2007 17:00 by rengber


Initial Code
private void btnDeleteRows_Click(object sender, System.EventArgs e)
{
  dataGrid1.Focus(); 
  SendKeys.Send("{DELETE}"); 		
}

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

Initial Description
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.

Initial Title
Send a KeyPress Event to a Windows Form

Initial Tags


Initial Language
C#