Knowledge Base

Joystick.exe Calls the Joystick API Functions

PSS ID Number: 181478

Article Last Modified on 4/22/2003


The information in this article applies to:


This article was previously published under Q181478

SUMMARY

Joystick.exe is a self-extracting compressed file containing a sample project that demonstrates how to use the Joystick API functions in Visual Basic. You can use this sample as a starting point for a game program that uses a joystick for an input device.

MORE INFORMATION

The following files are available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. When you run the self-extracting compressed file, the following files are expanded in the Joystick Sample Project directory:

How the Sample Works

The joyGetDevCaps function is used in the form load event to determine if a joystick is connected to the system. If the function is successful, the form is redrawn with new controls to display the capabilities of the joystick. These capabilities are stored in the members of the JOYCAPS user- defined type variable. A timer control is used to poll the joystick's position. The current position is determined by the successful results of the joyGetPosEx function. The members of the JOYINFOEX user-defined variable type contain the joystick position information. This information is displayed in text boxes in the form.

Keywords: kbfile kbinfo kbSample KB181478
Technology: kbAudDeveloper kbVB500 kbVB500Search kbVBSearch kbZNotKeyword2 kbZNotKeyword6