How do I use the d-pad in my eVB program?
It produces key messages just like the arrow keys on a PC. Keycodes are VK_UP, VK_RIGHT, etc.
Dan East
VK didn't work so I went into the help file and searched for vk. The codes I found didn't include the right and left d-pad buttons.
How do I use the vk codes in eVB. Can you give me an example please?
Here is some code I used before hope it helps
we have the GetAsyncKeyState function which makes it possible to turn over the state of the key whose code passed in parameter. This function is in the Coredll bookshop and is declared in the following way:
Public Declare Function GetAsyncKeyState Lib "Coredll" (ByVal vKey As Long) As Boolean
We declare these values in the form of constants in eVB:
Const VK_LBUTTON = &H1;
Const VK_UP = &H26;
Const VK_RIGHT = &H27;
Const VK_DOWN = &H28;
Const VK_LEFT = &H25;
Const VK_F23 = &H86;
Example: To recover the state of the key Action of the PAD
Dim wEtat as Boolean
wEtat = GetAsyncKeyState(VK_F23)
If wEtat Then Call MsgBox("you touched action on D PAD.")
Or, we can check if the stylet is in contact with the screen:
wEtat = GetAsyncKeyState(VK_LBUTTON)
The Complete list of codes for each key press is below
VK_LBUTTON & h1 Activated pointer
VK_UP & h26 PAD upwards
VK_RIGHT & h27 PAD towards the right
VK_DOWN & h25 PAD downwards
VK_LEFT & h25 PAD towards the left
VK_F23 & h86 Button Action of the PAD
of course this has to be used within a proper program etc but this should get you going, hope it helps!
- Jarin