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. how to implement Keybord shortcuts in a C# window application

how to implement Keybord shortcuts in a C# window application

Scheduled Pinned Locked Moved C#
csharptutorial
6 Posts 3 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.
  • T Offline
    T Offline
    TJS4u
    wrote on last edited by
    #1

    hello all, i have a c# window application form in which i have made options through the menustrip like file---> Open-----> New----> EXIT .... etc here i have written the code this.close() for EXIT. and if i run the application and click the EXIT it will close the application Now i want the same thing to be occured if i press ctrl+x through the Keybord. How to code this in c#. Thanks & Regards TJS

    G 1 Reply Last reply
    0
    • T TJS4u

      hello all, i have a c# window application form in which i have made options through the menustrip like file---> Open-----> New----> EXIT .... etc here i have written the code this.close() for EXIT. and if i run the application and click the EXIT it will close the application Now i want the same thing to be occured if i press ctrl+x through the Keybord. How to code this in c#. Thanks & Regards TJS

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      As far as I know you can set the shortcut from the properties window in visual studio.

      T S 2 Replies Last reply
      0
      • G Giorgi Dalakishvili

        As far as I know you can set the shortcut from the properties window in visual studio.

        T Offline
        T Offline
        TJS4u
        wrote on last edited by
        #3

        hello Giorgi Dalakishvili, Thanks a lot TJS

        G 1 Reply Last reply
        0
        • T TJS4u

          hello Giorgi Dalakishvili, Thanks a lot TJS

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          You are welcome :)

          Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

          1 Reply Last reply
          0
          • G Giorgi Dalakishvili

            As far as I know you can set the shortcut from the properties window in visual studio.

            S Offline
            S Offline
            Seraph_summer
            wrote on last edited by
            #5

            you can also use keydown envent

            G 1 Reply Last reply
            0
            • S Seraph_summer

              you can also use keydown envent

              G Offline
              G Offline
              Giorgi Dalakishvili
              wrote on last edited by
              #6

              Why complicate things that Framework can handle itself?

              Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

              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