Too bad you put in some work already, because with the release of the .NET
CF SP2 earlier this week the KeyUp, KeyDown events are available in the
ComboBox and in all other controls as well.
Snippet of the improvements:
.NET Compact Framework 1.0 Service Pack 2 details:
Performance & Other Improvements List:
- Extend keyboard events to be enabled on all controls (Control.KeyUp,
KeyDown, KeyPress)
So what you can do now when having a regular ComboBox is the following:
//
// comboBox1
//
this.comboBox1.KeyDown += new
System.Windows.Forms.KeyEventHandler(this.comboBox1_KeyDown);
and simply write a KeyDown handler for it:
private void comboBox1_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
MessageBox.Show("KeyDown event received");
}
SP2 is available for download at the following URL:
http://www.microsoft.com/downloads/d...displaylang=en.
--
Regards,
Maarten Struys
PTS Software bv
"jerry way" <(E-Mail Removed)> wrote in message
news:988c01c37ff6$93382b00$(E-Mail Removed)...
> Does anyone know how to capture the KeyDown event in a
> ComboBox? Since this event is not supported in compact
> framework, I created a customized ComboBoxEx control,
> which is derived from ComboBox and overrides its OnKeyDown
> method - this is the recommended way in MSDN but however
> it doesn't work.
>
> Anyone has thoughts on this?