Watching for a double key press

I need a program to sit quitly in the back ground and only come up when the user presses a cirtain key combination, i.e. if the press ctrl twice. I could be in any program when this happens.

Does anyone know how to do this?
LVL 1
James_WyattAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Maxim10553Commented:
how do you want the listener program to run? manually? on startup? the following is code from a PAQ to implement the hook
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21596242.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James_WyattAuthor Commented:
the program will run on startup.

I've implemented the code from the example, it does call the 'New' sub however it doesn't seem to call the 'LowLevelKeyboardProc' function.
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
If you're using VB.Net 2005, I've found that the low level keyboard hook only seems to work in the RELEASE version of the application.  For some reason it won't work in the IDE...

In VB.Net 2003 and below you can run the hook in the IDE no problems.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

James_WyattAuthor Commented:
Yep that was the problem (.NET 2005), very very annoying, thanks for your help both of you.
0
Maxim10553Commented:
yw, thanks for the points.
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
"very very annoying"

Yes...VERY annoying...it took me quite awhile to figure this out!  The same bloody code worked fine in VB.Net 2003 and I tried many, many different versions of the code in VB.Net 2005 before I figured out the code was just fine as it originally was.   Grrrrrrr.....      (I still don't know what the difference in the IDEs is)

=)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.