VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Various joy stick functions, determine if a joy stick is present

Anonymous  (267 Submissions)   Games   Visual Basic 4.0 (32-bit)   Unknown Difficulty   Fri 2nd April 1999   Mon 8th February 2021

Various joy stick functions, determine if a joy stick is present

API Declarations


Public Const JOY_BUTTON1 = &H1
Public Const JOY_BUTTON2 = &H2
Public Const JOY_BUTTON3 = &H4
Public Const JOY_BUTTON4 = &H8

Public Type JOYINFO
X As Long
Y As Long
Z As Long
Buttons As Long
End Type


' Private defs
Private Const JOYERR_BASE = 160
Private Const JOYERR_NOERROR = (0)
Private Const JOYERR_NOCANDO = (JOYERR_BASE + 6)
Private Const JOYERR_PARMS = (JOYERR_BASE + 5)
Private Const JOYERR_UNPLUGGED = (JOYERR_BASE + 7)

Private Const MAXPNAMELEN = 32

Private Type JOYCAPS
wMid As Integer
wPid As Integer
szPname As String * MAXPNAMELEN
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
End Type

Private Declare Function joyGetDevCaps Lib "winmm.dll" _
Alias "joyGetDevCapsA" (ByVal id As Long, _
lpCaps As JOYCAPS, ByVal uSize As Long) As Long

Private Declare Function joyGetNumDevs Lib "winmm.dll" _
() As Long

Private Declare Function joyGetPos Lib "winmm.dll" _
(ByVal uJoyID As Long, pji As JOYINFO) As Long
'
' Fills the ji structure with the minimum x, y, and z
' coordinates. Buttons is filled with the number of
' buttons.

Rate Various joy stick functions, determine if a joy stick is present (2(2 Vote))
Various joy stick functions, determine if a joy stick is present.bas

Various joy stick functions, determine if a joy stick is present Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters