• 0

Execute on keypress [C#]


Question

I'm making a small app that performs some action when I press a specified key on the keyboard. I want the app to be running in the system tray most of the time and still capture the key presses. can anyone help me setup a keypress listener that would work in that way? I'm a noob at C# but know a fair amount of java and C++.

btw, i'm using VS .NET 2003

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I put in the code for the SetWindowsHookEx but i'm getting 2 namespace errors. HookProc and HookType are not defined. do i have to import the whole dll so these show up? I don't really know how to do that in VS

Link to comment
Share on other sites

  • 0
I'll be interested to hear how you end up achieving it.  Let me know.

584719000[/snapback]

Actually, the way I'm going to do it is just to give up on the whole global shortcut idea. I'm making a c++ console app instead, that I may extend to do more later. here is my post about my project. https://www.neowin.net/forum/index.php?showtopic=229349

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.