catch CTRL-C into a console application

  • Thread starter Thread starter Claudiu Felecan
  • Start date Start date
Hi Claudiu

Just place the following code into you form

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Control | Keys.C))
{
MessageBox.Show("THIS IS IT");
return true;
}

return base.ProcessCmdKey (ref msg, keyData);
}


HTH

Philipp
 
Back
Top