A class to interface with DirectX DirectInput joysticks.
| C# | Visual Basic | Visual C++ |
public class Joystick
Public Class Joystick
public ref class Joystick
| All Members | Constructors | Methods | Properties | Fields | Events |
| Icon | Member | Description |
|---|---|---|
| Joystick(DeviceInstance) |
Constructor for internal use only.
| |
| Acquired |
Acquire access to the joystick.
| |
| AvailableAxes()()() |
Get the available axes for this joystick.
| |
| AxisChange |
An event for handling changes in joystick axes.
| |
| AxisCount |
Get the number of axes present on the joystick.
| |
| Button(Int32) |
Get the value of the specified button.
| |
| ButtonChange |
An event for handling changes in joystick buttons.
| |
| ButtonCount |
Get the number of buttons on the joystick.
| |
| device |
The DirecInput device associated with the joystick.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| Find(String) |
Find a joystick by name.
| |
| GetAxis(Joystick..::.Axes) |
Get the value of the specified axis.
| |
| GetAxisDeadZone(Joystick..::.Axes) |
Get the DeadZone for the specified axis, as a percent of the axis range.
| |
| GetAxisRange(Joystick..::.Axes) |
Get the range for the specified axis.
| |
| GetHashCode()()() | Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
| GetObject(String) |
Return the named joystick interface feature.
| |
| GetPOV(Int32) |
Get the value of the specified POV button, in degrees.
| |
| GetSlider(Int32) |
Get the value of the specified slider.
| |
| GetSliderRange(Int32) |
Get the range for the specified slider.
| |
| GetType()()() | Gets the Type of the current instance. (Inherited from Object.) | |
| Handle |
A Forms window handle that can be specified, if desired,
for setting the Joystick cooperative level.
| |
| HasAxis(Joystick..::.Axes) |
Return true if the joystick has a Z rotation axis.
| |
| HasRx |
Return true if the joystick has an X rotation axis.
| |
| HasRy |
Return true if the joystick has a Y rotation axis.
| |
| HasRz |
Return true if the joystick has a Z rotation axis.
| |
| HasX |
Return true if the joystick has an X axis.
| |
| HasY |
Return true if the joystick has a Y axis.
| |
| HasZ |
Return true if the joystick has a Z axis.
| |
| JoySticks |
A list of available joysticks attached to the system.
| |
| MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Name |
The name of the DirectInput joystick device.
| |
| ObjectExists(String) |
Check for the existence of the named joystick interface feature.
| |
| Poll(Boolean) |
Poll the joystick and record current values.
| |
| POV1 |
Get the value of POV button 1, in degrees.
| |
| POV2 |
Get the value of POV button 2, in degrees.
| |
| POV3 |
Get the value of POV button 3, in degrees.
| |
| POV4 |
Get the value of POV button 4, in degrees.
| |
| POVChange |
An event for handling changes in joystick point-of-view buttons.
| |
| POVCount |
Get the number of POV buttons on the joystick.
| |
| Rx |
Get the rotational X axis value.
| |
| RxDeadZone |
Get or set the DeadZone for the X rotation axis, as a percent of the axis range.
| |
| RxRange |
Get or set the range for the X rotation axis.
| |
| Ry |
Get the rotational Y axis value.
| |
| RyDeadZone |
Get or set the DeadZone for the Y rotation axis, as a percent of the axis range.
| |
| RyRange |
Get or set the range for the Y rotation axis.
| |
| Rz |
Get the rotational Z axis value.
| |
| RzDeadZone |
Get or set the DeadZone for the Z rotation axis, as a percent of the axis range.
| |
| RzRange |
Get or set the range for the Z rotation axis.
| |
| SetAxisDeadZone(Joystick..::.Axes, Int32) |
Set the DeadZone for the specified axis, as a percent of the axis range.
| |
| SetAxisRange(Joystick..::.Axes, InputRange) |
Set the range for the specified axis.
| |
| SetSliderRange(Int32, InputRange) |
Set the range for the specified slider.
| |
| Slider1 |
Get the value of slider 1.
| |
| Slider1Range |
Get or set the range for slider 1.
| |
| Slider2 |
Get the value of slider 2.
| |
| Slider2Range |
Get or set the range for slider 2.
| |
| SliderChange |
An event for handling changes in joystick sliders.
| |
| SliderCount |
Get the number of sliders on the joystick.
| |
| state |
The current state of the joysticks axes, buttons and sliders.
| |
| ToString()()() |
The string representation of the Joystick.
(Overrides Object.ToString()()().) | |
| X |
Get the X axis value.
| |
| XDeadZone |
Get or set the DeadZone for the X axis, as a percent of the axis range.
| |
| XRange |
Get or set the range for the X axis.
| |
| Y |
Get the Y axis value.
| |
| YDeadZone |
Get or set the DeadZone for the Y axis, as a percent of the axis range.
| |
| YRange |
Get or set the range for the Y axis.
| |
| Z |
Get the Z axis value.
| |
| ZDeadZone |
Get or set the DeadZone for the Z axis, as a percent of the axis range.
| |
| ZRange |
Get or set the range for the Z axis.
|
| Object | |
| Joystick | |