Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

Reading a Joystick from USB Port (VB)

Hello,
I am trying to find a way by which I can read from 2 joysticks attached to 2 different usb ports in Visual Basic. Need to figure out which key on the joystick was pressed and for how long (i.e. onset and offset). If anyone knows how to do this and can help me out, that wud be great. Thanks in advance.
neophyte.
0
neophyteprogrammer
Asked:
neophyteprogrammer
  • 2
1 Solution
 
KillerAppCommented:
If its got a regular driver then DirectInput would probably be a way to go.
0
 
neophyteprogrammerAuthor Commented:
Thanks for your response. But DirectInput seems to be used in VC++ and not visual basic. I have found an example from the MSDN library called joystick.exe (you can download it for free, if anyone wants I can send the link) which explains the procedure to read joystick information in VB. Hope this info wud help.
0
 
KillerAppCommented:
Microsoft put quite a lot of work into DirectX 8 and 9 to make it VB compatible.
0
 
CleanupPingCommented:
neophyteprogrammer:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now