tarfeef101
-1
Q:

how to detect f5 key in c#

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.F5)
            {
                MessageBox.Show("F5-key pressed");
            }
        }

// or
public class DummyClass
{
  	public DummyClass()
  	{
      	 // event for any key pressed
        TreeList.KeyUp += TreeList_KeyUp;
    }
  
	 private void TreeList_KeyUp(object sender, KeyEventArgs e)
     {
         if (e.KeyData == Keys.F5)
         {
                GetData();
                ShowContent();
         }
       
      }
  	
}	
1

New to Communities?

Join the community