Jump to content

F1 Help

- - - - -

  • Please log in to reply
2 replies to this topic

#1
shyamenk

shyamenk

    Newbie

  • Members
  • PipPip
  • 11 posts
How can i assign F1 Short key for help menu item.......

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
The ToolStripMenuItem object has a ShortcutKeys property which you can set to F1 or any other key you want.

#3
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
You could also just use a keyUp event like so:
private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F1)
            {
                MessageBox.Show("F1");
            }
        }
But make sure your "KeyPreview" propertiy is set to "true" on your form.

Happy C0ding ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users