KeyDown Problems In VB.Net 2003 CF

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

I am trying to set the date field on a form to set the current date when 'T'
is pressed on the InputPanel.

I can get the date to come up, but the 'T' appears before it... how do I
cancel the KeyEvent? I don't want the letter to show up...

Also, I am trying to Tab through the fields... How is that done? I do not
see any TabStop properties nor can I seem to trap Tabs in ComboBoxes. Help
!

Thanks for any suggestions or help.

Atley
 
Atley said:
I am trying to set the date field on a form to set the current date when 'T'
is pressed on the InputPanel.

I can get the date to come up, but the 'T' appears before it... how do I
cancel the KeyEvent? I don't want the letter to show up...

I tried using the KeyPress-event like this, it works:

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = "t" Or e.KeyChar = "T" Then
e.Handled = True
TextBox1.Text = 'Your date-formatting routine...
End If
End Sub


Tore Stensby
my .net CF site (In norwegian):
www.stensby.com/netcf
 
You need to install Compact Framework SP2 to get keypress events to all
controls. In the previous versions only textbox had support for keypress
events.

To tab through fields you need to implement your own data model (unless this
is added in SP2 as well, which I don't know). I use a arraylist that lists
all controls that can be "tabbed" to, and a index that keeps track on where
we can tab to next.

/ Peter
 
Do I need to install that to my device or to my Dev machine?
and does it install to the ROM in my device if I have to update it there?



Just wondering

Atley
 
Atley,

You need to install it to your device. It doesn't install to ROM, so a hard
reset will remove it.
 
Tabbing is based on the z-order of the controls in CF-SP2. Note also that
all controls are not tabable on PPC.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top