This method opens the Web(USB) camera in capture (recording) mode.
Public Function Open(ByVal fileName As String) As Boolean
Public Function Open(ByVal fileName As String, ByVal videoDevice As String) As Boolean
Public Function Open(ByVal fileName As String, ByVal index As Integer) As Boolean
Public Function Open(ByVal fileName As String, ByVal outputControl As System.Windows.Forms.Control) As Boolean
Public Function Open(ByVal fileName As String, ByVal videoDevice As String, ByVal outputControl As System.Windows.Forms.Control) As Boolean
Public Function Open(ByVal fileName As String, ByVal index As Integer, ByVal outputControl As System.Windows.Forms.Control) As Boolean
public bool Open(string fileName);
public bool Open(string fileName, string videoDevice);
public bool Open(string fileName, int index);
public bool Open(string fileName, System.Windows.Forms.Control outputControl);
public bool Open(string fileName, string videoDevice, System.Windows.Forms.Control outputControl);
public bool Open(string fileName, int index, System.Windows.Forms.Control outputControl);
Parameters
fileName
The name of the file where the recording is saved.
videoDevice
The name of the Web(USB) camera
The index of the Web(USB) camera
outputControl
outputControl
The control that displays the output
Return Value
Returns True if successful, otherwise returns False
Explanation
The Open method opens the Web(USB) camera in capture (recording) mode.
The fileName parameter sets the file where the capture will be saved. The Format property will determine if the capture will be saved in AVI format or in WMV format.
The videoDevice parameter holds the name of the device, the index parameter holds a string array index for the device as returned by the GetVideoDevices method. (If multiple devices are returned it will be one of them). When using a method that doesn't have the videoDevice parameter or an index parameter, use the first device returned by the GetVideoDevices method.
The outputControl parameter holds the control that displays the output. If no control is passed to the outputControl parameter, the output will be displayed in the Preview control.
If successful, the State property will be changed. If unsuccessful, then "DirectX", "Step", "Connect" or "Interface" will be set in the ErrorStatus property.
Important: Preview (Preview Class) and Record cannot be used at the same time. When using Record, be sure to close the Web(USB) camera with the Preview.Close method and then reconnect to the camera using Record.Open.
See Also
Record Members | Newtone.ImageKit.Win.WebCamera.Record