Platform SDK: DirectX

Joystick Sample

[C++]

This topic pertains only to application development in Visual Basic. See DirectInput C/C++ Samples.

[Visual Basic]

Description

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

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Src\Joystick

Executable: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Bin\Joystick.exe

User's Guide

Select a joystick from the list. The data from the axes and buttons is displayed.

Programming Notes

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