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. Key pressed

Key pressed

Scheduled Pinned Locked Moved C#
csharpquestion
6 Posts 5 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
    t_nedelchev
    wrote on last edited by
    #1

    Hello every body. My project is C# project on VS2005 .net How can I catch a key pressed but not like event for a Form , tabControl and other component, for all program.For exapmle: If my program is started and is pressed keys like F1,F2,F3... and etc. I want to make some function on this Keys pressed. Thanks for all in advance.

    N A L 3 Replies Last reply
    0
    • T t_nedelchev

      Hello every body. My project is C# project on VS2005 .net How can I catch a key pressed but not like event for a Form , tabControl and other component, for all program.For exapmle: If my program is started and is pressed keys like F1,F2,F3... and etc. I want to make some function on this Keys pressed. Thanks for all in advance.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      t_nedelchev wrote:

      How can I catch a key pressed but not like event for a Form

      What do you mean?


      only two letters away from being an asset

      D 1 Reply Last reply
      0
      • T t_nedelchev

        Hello every body. My project is C# project on VS2005 .net How can I catch a key pressed but not like event for a Form , tabControl and other component, for all program.For exapmle: If my program is started and is pressed keys like F1,F2,F3... and etc. I want to make some function on this Keys pressed. Thanks for all in advance.

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        :confused::confused:

        Best Regards ----------------- Abhijit Jana View My Latest Article :- SpyNet : Your Network Spy "Success is Journey it's not a destination"

        1 Reply Last reply
        0
        • N Not Active

          t_nedelchev wrote:

          How can I catch a key pressed but not like event for a Form

          What do you mean?


          only two letters away from being an asset

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #4

          I think he means an application wide keypress event handler.

          D 1 Reply Last reply
          0
          • D DaveyM69

            I think he means an application wide keypress event handler.

            D Offline
            D Offline
            DaveyM69
            wrote on last edited by
            #5

            Have a look here[^]. I haven't tried it but it looks like it'll do what you want.

            1 Reply Last reply
            0
            • T t_nedelchev

              Hello every body. My project is C# project on VS2005 .net How can I catch a key pressed but not like event for a Form , tabControl and other component, for all program.For exapmle: If my program is started and is pressed keys like F1,F2,F3... and etc. I want to make some function on this Keys pressed. Thanks for all in advance.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Hi, yes you can create system-wide hotkeys. My Code Rescue article[^] uses them (but does not mention it in the article itself). There is some P/Invoke involved, calling Win32 functions. :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


              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