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.
 
Back
Top