How to trap F5 in Windows Forms?

  • Thread starter Thread starter Ryu
  • Start date Start date
R

Ryu

Hi All,

I have created a simple form that displays a simple message. But the message
cant seem to be displayed? Any reason why? Below is my code.

private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs
e)

{

if(e.KeyCode == Keys.F5)

{

MessageBox.Show("It is done");

}

}
 
Back
Top