Page 1 of 1

PostPosted: Wed Sep 10, 2003 7:46 pm
by jhancock
I've tried just about every combination but obviously not the correct one to send a '.' or VK_decimal to a non-number edit box using the standard pocketc interface without luck.

Basically, I have small keyboard displayed with buttons for the numbers 0-9 and the '.' I used getc to check the code and it is a 0x2e coming from the character recognizer on a wince 3.0 device. I suspect it should be 0x6e.

With the focus on the edit control, pressing the numbers work fine but the 2e deletes the next character and the 6e gives me nothing.

I tried adding the keyup 0x2 without luck and also tried sending the numlock first but neither worked.

this is somewhat holding up my project. It is always the simple things... By the way, I can enter the '.' using the character recognizer and the popup keyboard into the edit field.

thanks - this is a great product

PostPosted: Mon Sep 15, 2003 9:29 am
by aliosmanpro
Private Sub txtTotal_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
Select Case KeyCode
Case 190
txtTotal.Locked = False
Case Else
MsgBox KeyCode
txtTotal.Locked = True
End Select
End Sub

you can learn keycodes with msgbox function. Becouse some of them has same keycode.

PostPosted: Tue Sep 16, 2003 1:00 am
by jhancock
I ended up finding the keyin() function in pocketc which gives a more accurate picture as to the keyevents needed for certain keys. It ended up being:

keyevent(190,0,0,0); // keydown
keyevent(46,0,2,0); // keyup
keyevent(190,0,2,0); // keyup