joystick controls 
Author Message
 joystick controls

Does anybody happen to know where I can find a control that will detect
movements and button presses from a joystick or gamepad?  Any help would be
greatly appreciated.


Wed, 18 Apr 2001 03:00:00 GMT  
 joystick controls
'Declare thes ones :

Private Declare Function joyGetPos Lib "winmm" (ByVal _
    id As Long, lpInfo As JOYINFO) As Long

Private Type JOYINFO
    wXpos As Long
    wYpos As Long
    wZpos As Long
    wButtons As Long
End Type

Const JOYSTICKID1 = 0
Const JOYSTICKID2 = 2
Const JOY_BUTTON0 = &H1
Const JOY_BUTTON1 = &H2
Const JOY_BUTTON2 = &H4
Const JOY_BUTTON3 = &H8

'---------------------------------------------------------------------------
---------
'Then on a timer (every 150 millisecond for example), do this :
Dim JoystickInfo As JOYINFO
joyGetPos JOYSTICKID1, JoystickInfo

'Now you can test for example (wButtons AND JOY_BUTTON0) <> 0

You don't need to buy any control.
Sylvain

Erik Thompson a crit dans le message

Quote:
>Does anybody happen to know where I can find a control that will detect
>movements and button presses from a joystick or gamepad?  Any help would be
>greatly appreciated.



Sun, 22 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Joystick Control

2. Joystick control

3. Joystick Control-Learning difficulties

4. Joystick Control

5. Joystick Control in VB3.0

6. VB5 + Joystick-control

7. Joystick control?

8. Joystick output (Joystick Programming in vb)

9. control external relay through joystick/serial port?

10. control external relay through joystick/serial port?

11. Whats the win95 DLL name to control a joystick in VB

12. control external relay through joystick/serial port?

 

 
Powered by phpBB® Forum Software