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
 

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