Start by making your subject related to what you are looking for. This entire
forum is generally set up for people learning how to do something or anther.
So, do you have a console application, or a windows form app with the main
form invisible, or are you trying to write a global keyboard hook? Be as
specific with your question as you can.
The more people have to guess, the less likely they are to help.
It's a win forms application and Yes, i do have a invisible
main form but i want to have a global hook independent
to the main form.
From the main application i start a new thread with some loop
inside without any form displayed. I want to break that loop
when user presses ESC button...
It's a win forms application and Yes, i do have a invisible
main form but i want to have a global hook independent
to the main form.
From the main application i start a new thread with some loop
inside without any form displayed. I want to break that loop
when user presses ESC button...
So the user could be off in any other application and press Esc for some
perfectly reasonable purpose in that application and you want YOUR process
to stop?
I'm guessing your application would be used to capture a screen session in
Windows or something like that, and you would terminate the session by
pressing the ESC key.
I'm guessing you're going to have to get a handle to the desktop, then
process characters that the desktop receives.
I'm not sure how to do that, though. If using C#, you'll almost certainly
need to P/Invoke some of the Windows APIs.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.