Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Public ShortCut

Public ShortCut

Scheduled Pinned Locked Moved C#
questiontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ariyanna
    wrote on last edited by
    #1

    Hi, to Every one, i want to use shortcut keys for my program functions, in example when a user clicks on the specific button a function calls by the program now i want, user can access to this method by pressing a specific key (like Alt+E) instead pressing a button... how can i do this ? -- thanks to you all --> :rose:

    T 1 Reply Last reply
    0
    • A ariyanna

      Hi, to Every one, i want to use shortcut keys for my program functions, in example when a user clicks on the specific button a function calls by the program now i want, user can access to this method by pressing a specific key (like Alt+E) instead pressing a button... how can i do this ? -- thanks to you all --> :rose:

      T Offline
      T Offline
      Thomas Stockwell
      wrote on last edited by
      #2

      You need to setup keypreview for the form, and then listen to the KeyPress events. When the specified keys are pressed then call the necessary function. If I am correct some menu items can be automatically set for a key shortcut. So when the specified shortcut is pressed then the menu item click event is called automatically.

      Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my Blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups