PDA

Click to See Complete Forum and Search --> : Is this correct(keyboard events)?


sapator
May 10th, 2007, 07:28 AM
Hi.
I try to pass a presskey event but i cannot do it.
I'm using Smartphone 2003

Declare Sub keybd_event Lib "coredll.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
Dim VK_BACK As Byte = &H8
Dim KEYEVENTF_KEYDOWN As integer = &H0

Dim KEYEVENTF_KEYUP As integer = &H2
keybd_event(VK_BACK, 0, KEYEVENTF_KEYDOWN, 0)
keybd_event(VK_BACK, 0, KEYEVENTF_KEYUP, 0)

I does not work thought.
Anyone?

petevick
May 11th, 2007, 01:22 AM
Has your text box got focus when you call it?

Try sending a letter such as 'A' to see if that is working, as opposed to a backspace.

Pete

sapator
May 11th, 2007, 05:09 AM
It worked with p.e. keybd_event(50, 0, 0, 0)
the problem is that i can't find the correct byte value for the "back" button.
And also i don't know if the numbers are the same in all the smathphones.
Such a mess :(