tags:

views:

24

answers:

1

I'm trying to capture key down events from the MainWindow, but I have a treeview which currently has focus is grabbing them before they reach my other class. The TreeView is hooked into the PreviewKeyDown event and does some processing to ignore certain keystrokes. I was hoping by hooking into the main window it would ignore that preview mouse down event. Any thoughts on how to bypass the preview mouse down?

+1  A: 

You will need a window hook. See this MSDN article for details. This article has a mouse hook example.

SwDevMan81