Microsoft DirectX 8.1 (Visual Basic)

Joystick Sample

Description

The Joystick sample program shows how to enumerate joysticks, set joystick properties, and get immediate data.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectInput\Joystick

Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectInput\Bin\VB_Joystick.exe

User's Guide

Select a joystick from the list. The data from the axes and buttons is displayed. Observe how the displayed data changes when you move and twist the stick, rotate the throttle wheel, and press buttons in various combinations.

Programming Notes

The list box is unsorted so that the selection can easily be retrieved from the DirectInputEnumDevices8 collection.