How can I override Ctrl-F?

JimColeman
05-14-2007, 06:45 PM
Hi everyone. I am writing a C# app that has MapPoint embedded in it. I want to implement my own ctrl-F functionality, and hide MapPoint’s, however I don't see an event that is provided for KeyUp or KeyDown (like it is for mouse move, mouse click, etc.) Any ideas on how to accomplish this?

I tried overriding the WndProc of the panel that the mappoint control is on but mappoint gobbles up all the KeyStroke messages before it gets there. Is there a way to override MapPoints WndProc? If I catch the KeyStroke I want in the PreviewKeyDown event, is there a way to stop mappoint for popping up its find dialog?

Any advice would be very welcome!

Thanks in advance!

Wilfried
05-15-2007, 02:11 AM
Hi Jim,

A possible solution is to make a transparant panel and put it on top of the ActiveX control. Then you can intercept all keyboard and mouse, and you have full control. I think for keyboard you have to override the WndProc of the panel, not sure. Possible Keypreview of mainform is more simple if it works.

 
Web mp2kmag.com
mapforums.com