Use Game Controllers Via DirectX

Category:
Multimedia/Games
Type:
Applications
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
This sample project includes two classes and a module.
mControllers: Contains enumerations and support functions that are required.
cControllerList: Connects to DirectX and gets a list of all attached game controllers and initializes them for use.
cController: Wrapper for a DirectX game controller instance.

The sample project's form (frmSample) demonstrates how to use a cControllerList object to initialize and receive input from all attached game controllers. Note: You will need to add a project reference to 'DirectX 8 for Visual Basic Type Library'. If you don't have DirectX 8, you can use DirectX 7 instead, but this will require changing most of the DirectX-related declarations and perhaps some of the code.


Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download dxgamecontrollers.zip