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. Application Switching via a HotKey

Application Switching via a HotKey

Scheduled Pinned Locked Moved C#
tutorialhelp
6 Posts 4 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.
  • G Offline
    G Offline
    gmhanna
    wrote on last edited by
    #1

    Hi, I'm writing an application so that I can hotkey between several different applications. I know how to register and unregister the hot keys, where I need help is obtaining the windows title to compare and give that application focus. What I believe needs to happen is I need to iterate through each window/form to determine if this is the correct one, then switch to it. Any help or if you know of a programming example it would be greatly appreciated. Thank you,

    Glenn

    R L 2 Replies Last reply
    0
    • G gmhanna

      Hi, I'm writing an application so that I can hotkey between several different applications. I know how to register and unregister the hot keys, where I need help is obtaining the windows title to compare and give that application focus. What I believe needs to happen is I need to iterate through each window/form to determine if this is the correct one, then switch to it. Any help or if you know of a programming example it would be greatly appreciated. Thank you,

      Glenn

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      I think you may be taking the wrong approach.  IIRC, when an application registers a hot key, Windows notifies the application when the hotkey sequence is triggered.  What you seem to want to do is build a master app that directs notifications to other apps.  See this[^] recent article. /ravi

      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

      G 1 Reply Last reply
      0
      • R Ravi Bhavnani

        I think you may be taking the wrong approach.  IIRC, when an application registers a hot key, Windows notifies the application when the hotkey sequence is triggered.  What you seem to want to do is build a master app that directs notifications to other apps.  See this[^] recent article. /ravi

        My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

        G Offline
        G Offline
        gmhanna
        wrote on last edited by
        #3

        What I'm actually trying to do is setup fast pathing to an application. IE: If I hit the 1 on my numeric keypad it will go to my email, 2 will take me to Visual Studio, 3 will be my browser, etc.

        Glenn

        R T 2 Replies Last reply
        0
        • G gmhanna

          What I'm actually trying to do is setup fast pathing to an application. IE: If I hit the 1 on my numeric keypad it will go to my email, 2 will take me to Visual Studio, 3 will be my browser, etc.

          Glenn

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Ah OK... /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          1 Reply Last reply
          0
          • G gmhanna

            Hi, I'm writing an application so that I can hotkey between several different applications. I know how to register and unregister the hot keys, where I need help is obtaining the windows title to compare and give that application focus. What I believe needs to happen is I need to iterate through each window/form to determine if this is the correct one, then switch to it. Any help or if you know of a programming example it would be greatly appreciated. Thank you,

            Glenn

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

            You do not really need any app for that. This should work just fine: - on the desktop, create one shortcut for every app of interest; - double-clicking it would already run the app; - for each such shortcut, right-click and choose properties; now click in the "shortcut key" box and hit the key you want to associate with (or hit DEL to remove). BTW: I trust there are ways to get this done by code too. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            1 Reply Last reply
            0
            • G gmhanna

              What I'm actually trying to do is setup fast pathing to an application. IE: If I hit the 1 on my numeric keypad it will go to my email, 2 will take me to Visual Studio, 3 will be my browser, etc.

              Glenn

              T Offline
              T Offline
              T M Gray
              wrote on last edited by
              #6

              Unless you are doing it yourself in code for the practice and experience just install the MS IntelliType driver and you are done.

              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