keyevent and vk_decima

Discuss PocketC for CE (including Desktop Edition)

Postby jhancock on Wed Sep 10, 2003 7:46 pm

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
Posts: 2
Joined: Wed Sep 10, 2003 7:41 pm

Postby aliosmanpro on Mon Sep 15, 2003 9:29 am

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.
Posts: 2
Joined: Tue Sep 02, 2003 1:37 pm

Postby jhancock on Tue Sep 16, 2003 1:00 am

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
Posts: 2
Joined: Wed Sep 10, 2003 7:41 pm

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest