Microsoft DirectX 8.1 (Visual Basic) |
Sets properties that define the device behavior.
object.SetProperty( _ guid As String, _ propertyInfo As Any)
The lData member can be one of the following values from the CONST_DINPUT enumeration.
DIPROPAUTOCENTER_OFF: The device should not automatically center when the user releases the device. An application that uses force feedback should disable autocentering before playing effects.
DIPROPAUTOCENTER_ON: The device should automatically center when the user releases the device.
Not all devices support the autocenter property.
This setting applies to the entire device, so the lHow member of the DIPROPLONG type must be set to DIPH_DEVICE.
This setting applies to the entire device, so the lHow member of the associated DIPROPLONG type must be set to DIPH_DEVICE.
Setting the calibration mode for the entire device is equivalent to setting it for each axis individually.
The lData member of the DIPROPLONG type may be one of the following values:
DIPROPCALIBRATIONMODE_COOKED: DirectInput should return data after applying calibration information. This is the default mode.
DIPROPCALIBRATIONMODE_RAW: DirectInput should return raw, uncalibrated data. This mode is typically used only by Control Panel–type applications.
Note that setting a device into raw mode causes the dead zone, saturation, and range settings to be ignored.
This setting can be applied to either the entire device or to a specific axis.
The lData member contains a gain value that is applied to all effects created on the device. The value is an integer in the range from 0 through 10,000, and specifies the amount by which effect magnitudes are scaled for the device. For example, a value of 10,000 indicates that you should take all effect magnitudes at face value. A value of 9,000 indicates that you should reduce all effect magnitudes to 90% of their nominal magnitudes.
Setting a gain value is useful when an application wants to scale down the strength of all force-feedback effects uniformly, based on user preferences.
Unlike other properties, the gain can be set when the device is in an acquired state.
This setting applies to the entire device, so the lHow member of the associated DIPROPSTRING type must be set to DIPH_DEVICE.
The PropString member is a string that specifies the new friendly instance name for the device.
This setting applies to the entire device, so the lHow member of the associated DIPROPSTRING type must be set to DIPH_DEVICE.
The PropString member is a string that specifies the new friendly product name for the device.
For some devices, this is a read-only property.
You cannot set a reverse range; lMax must be greater than lMin.
This setting can be applied to either the entire device or to a specific axis.
If the method fails, an error is raised and Err.Number may be one of the following error codes.
DIERR_INVALIDPARAM |
DIERR_OBJECTNOTFOUND |
DIERR_UNSUPPORTED |
The buffer size determines the amount of data that the buffer can hold between calls to the DirectInputDevice8.GetDeviceData method before data is lost. This value may be set to 0 to indicate that the application will not be reading buffered data from the device. If the buffer size in the lData member of the DIPROPLONG type is too large to be supported by the device, the largest possible buffer size is set. To determine whether the requested buffer size was set, retrieve the buffer-size property and compare the result with the value you previously attempted to set.