How do I input values from the games port into a VB programme ? For example how could I tell the position of a Joystick ? Are there any controls which do this ? or could I use API ?
Printable View
How do I input values from the games port into a VB programme ? For example how could I tell the position of a Joystick ? Are there any controls which do this ? or could I use API ?
You need to use this API
Declare Function joyGetPos Lib "winmm.dll" (ByVal uJoyID As Long, pji As JOYINFO) As Long
JOYINFO structure:
Type JOYINFO
wXpos As Long
wYpos As Long
wZpos As Long
wButtons As Long
End Type
Hope this helps
if you want to make games.. why not using the directx 7. you can download the directx 7 sdk version from the msdn web site. there are alot of vb examples with it. even a example how you can use a joystick in your won games.