Controls not processing Keyboard events

G

Guest

Hi Al

I am a new to developing CF applications and am trying to port a regular .NET application to CF. From what I have read it looks like individual controls in a form should get Keyboard events, however this does not seem to work with any of my controls

e.g. I have a combobox called cmbTrainID and I have an event handler for it as follows
Private Sub cmbTrainID_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmbTrainID.KeyDow

-- application specific cod

End Su

However when I press the down arrow on the combobox(when it has focus), the event if not fired. Do I need to do anything additional for this event to be handled

(Sorry for asking such a stupid question, but I did not do anything more than this with the .NET app

Highly appreciate your inpu

Thank

Balu
 
A

Alex Feinman [MVP]

Many of the intrinsic controls (Textbox, Label, Combobox etc) do not fire
the whole range of events supported in API. While painting events generally
cannot be intercepted at all, the keyboard and mouse events are possible to
intercept via corresponding windows messages (WM_CHAR, WM_LBUTTONDOWN...)
using OpenNETCF ApplicationEx class

--
Alex Feinman
---
Visit http://www.opennetcf.org
Balu said:
Hi All

I am a new to developing CF applications and am trying to port a regular
..NET application to CF. From what I have read it looks like individual
controls in a form should get Keyboard events, however this does not seem to
work with any of my controls.
e.g. I have a combobox called cmbTrainID and I have an event handler for it as follows:
Private Sub cmbTrainID_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles cmbTrainID.KeyDown
-- application specific code

End Sub

However when I press the down arrow on the combobox(when it has focus),
the event if not fired. Do I need to do anything additional for this event
to be handled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top