Capturing hardware key events in form rather than listview control

Capturing hardware key events in form rather than listview control

Post by QnJpYW4gTm » Fri, 21 Jan 2005 06:16:43


I have a form with an owner-drawn list view and I want to capture the
hardware left and right keys in the form itself, not in the owner-drawn list
view.

I've tried setting focus to the form at the end of its constructor by using
this.Focus(), but the event is still picked up only by the owner-drawn list
view and not by the form.

I need to pick the event up in the form, or execute a method in the form
from the control, any ideas?

Brian
 
 
 

Capturing hardware key events in form rather than listview control

Post by » Fri, 21 Jan 2005 12:35:35

An IMessageFilter implementation from OpenNETCF.Windows.Forms.ApplicationEx
would do it.

-Chris
www.opennetcf.org