Trapping key sequences from anywhere in an app

  • Thread starter Thread starter Tom Jones
  • Start date Start date
T

Tom Jones

I have an MDI WinForms app that I would like to embed a hidden key sequence
that will reveal internal information (specifically, the installation path
of a an application deployed by ClickOnce). Is there any way to trap key
sequences at a high level, such as Ctl-Shift-P?
 
Tom,

You can implement the IMessageFilter interface and then call the static
AddMessageFilter method, passing your interface implementation.

This will allow you to process all windows messages that are sent to the
application, and you can capture your key press there.

Hope this helps.
 

Ask a Question

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.

Ask a Question

Back
Top