Reading a Joystick from USB Port (VB)

Posted on 2003-02-28
Medium Priority
Last Modified: 2008-03-03
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.
Question by:neophyteprogrammer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8044627
If its got a regular driver then DirectInput would probably be a way to go.

Author Comment

ID: 8059315
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.

Accepted Solution

KillerApp earned 150 total points
ID: 8059729
Microsoft put quite a lot of work into DirectX 8 and 9 to make it VB compatible.

Expert Comment

ID: 9447433
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 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Starting up a Project

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question