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. Global Hook on IR control

Global Hook on IR control

Scheduled Pinned Locked Moved C#
htmlcomquestion
3 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.
  • L Offline
    L Offline
    Lapje
    wrote on last edited by
    #1

    Hi, I used the tutor from microsoft to get messages from my IR Control (link). The code works fine, but when the window loses focus, it doesn't work anymore. I need this code to work also when the program doesn't have focus (global hook?). Thanks in advance.

    D 1 Reply Last reply
    0
    • L Lapje

      Hi, I used the tutor from microsoft to get messages from my IR Control (link). The code works fine, but when the window loses focus, it doesn't work anymore. I need this code to work also when the program doesn't have focus (global hook?). Thanks in advance.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      From the little that I've seen about this, the remote works by using keyboard emulation. About half of the remote's keys are sent to the application using WM_INPUT and WM_KEYDOWN messages. This makes it easy to use, but when the focus changes, the "keystrokes" are now going to another application. This presents a problem. Since the message from the remote are exactly like normal keyboard messages, there's no way to tell them apart. You COULD put together a low level keyboard hook, but there's no way to tell if the keystrokes you're seeing are coming from the real keyboard or from the remote. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      L 1 Reply Last reply
      0
      • D Dave Kreskowiak

        From the little that I've seen about this, the remote works by using keyboard emulation. About half of the remote's keys are sent to the application using WM_INPUT and WM_KEYDOWN messages. This makes it easy to use, but when the focus changes, the "keystrokes" are now going to another application. This presents a problem. Since the message from the remote are exactly like normal keyboard messages, there's no way to tell them apart. You COULD put together a low level keyboard hook, but there's no way to tell if the keystrokes you're seeing are coming from the real keyboard or from the remote. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        L Offline
        L Offline
        Lapje
        wrote on last edited by
        #3

        Thanks, I'll go find some stuff on keyboard hooks then.

        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