ICImagingControl.DeviceFrameRate Property

Returns or sets the desired frame rate (in frames per second) of the current video capture device.
Syntax:
Public DeviceFrameRate As Single
Limitations:

Only available when a device is open and valid.

Remarks:

A call to ICImagingControl.DeviceFrameRates retrieves all valid frame rates. Only valid frame rates may be set. If an invalid frame rate is specified, the default frame rate of the video capture device will be set instead.

The device frame rate depends on the current video format. Changing the ICImagingControl.VideoFormat property invalidates the device frame rate.

If the bandwidth is too low, the video capture device is not able to send frames according to the desired frame rate which is stored in DeviceFrameRate. The actual frame rate of the current device can be retrieved by using ICImagingControl.DeviceCurrentActualFrameRate.

Sample:

This example shows how to set a frame rate. Assume, that lstFrameRateList is a combo box, which was previously filled with the frame rates the video capture device supports:

Private Sub lstFrameRateList_Click()
    Dim SelectedRate As Integer
    Dim DevFrameRateCol As DeviceFrameRates

    ' Get the DeviceFrameRates collection from ICImagingControl
    Set DevFrameRateCol = ICImagingControl1.DeviceFrameRates

    ' Get the selected frame rate from the combo box.
    SelectedRate = lstFrameRateList.ListIndex + 1

    ' Stop the grabber before setting the new frame rate.
    cmdStopLive_Click

    ' Now, set the new frame rate
    ICImagingControl1.DeviceFrameRate = DevFrameRateCol.Item(SelectedRate)
End Sub
See also: ICImagingControl, ICImagingControl.DeviceFrameRateAvailable, ICImagingControl.DeviceFrameRates, ICImagingControl.DeviceCurrentActualFrameRate

<< ICImagingControl