by Evan Toder (30 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)

THis is a joystick class that finds a valid joystick and then returns to you one event that reports everything you need to know to program that joystick..from which button is being pressed to the X and Y pos of both joyhandles(assuming your joypad has two..if only 1 this will still work) to the position of the D-pad
Side Effects
NOTE!!! IMPORTANT!! replace this structure with this....structure provided in submission not correct!!
'-- JOYCAPS User Defined Type.
Private Type JOYCAPS
wMid As Integer
wPid As Integer
szPname As String * 32
wXmin As Long
wXmax As Long
wYmin As Long
wYmax As Long
wZmin As Long
wZmax As Long
wNumButtons As Long
wPeriodMin As Long
wPeriodMax As Long
wRmin As Long
wRmax As Long
wUmin As Long
wUmax As Long
wVmin As Long
wVmax As Long
wCaps As Long
wMaxAxes As Long
wNumAxes As Long
wMaxButtons As Long
szRegKey As String * 32
szOEMVxD As String * 260
End Type
Private typeJoyCaps As JOYCAPS
Download Joystick Class and dem0 (49 KB)