I know close to nothing about VB but I'd like to play around and start learning. I have Win XP SP2 and VB 6.0 and an analog joystick. Just as a learning exercise and not for any aplication in particular I'd like some code which would read the joystick X, Y and 2 buttons. I found http://www.pages.drexel.edu/~kws23/tutorials/joyWin/joyWin.html which is supposed to deal with this problem but when I use the code in that page I run into problems.
The statements
- Dim ji As JOYINFOEX
- Dim caps As JOYCAPS
give the error "user defined type not defined".
joyGetPosEx gives the error "sub or function not defined", etc.
I have a feeling these are standard calls to Windows which may have been correct in older versions of Windows but may be obsolete now.
So, the question is, how can I read a joystick into VB?
The statements
- Dim ji As JOYINFOEX
- Dim caps As JOYCAPS
give the error "user defined type not defined".
joyGetPosEx gives the error "sub or function not defined", etc.
I have a feeling these are standard calls to Windows which may have been correct in older versions of Windows but may be obsolete now.
So, the question is, how can I read a joystick into VB?