This method opens the Web(USB) camera in preview mode.

[Visual Basic]
Public Function Open() As Boolean
Public Function Open(ByVal videoDevice As String) As Boolean
Public Function Open(ByVal index As Integer) As Boolean
Public Function Open(ByVal outputControl As System.Windows.Forms.Control) As Boolean
Public Function Open(ByVal videoDevice As String, ByVal outputControl As System.Windows.Forms.Control) As Boolean
Public Function Open(ByVal index As Integer, ByVal outputControl As System.Windows.Forms.Control) As Boolean
[C#]
public bool Open();
public bool Open(string videoDevice);
public bool Open(int index);
public bool Open(System.Windows.Forms.Control outputControl);
public bool Open(string videoDevice, System.Windows.Forms.Control outputControl);
public bool Open(int index, System.Windows.Forms.Control outputControl);

Parameters

videoDevice

The name of the Web(USB) camera

index

The index of the Web(USB) camera

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 preview mode.

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 "Step", "Connect" or "Interface" will be set in the ErrorStatus property.

Important: Recording (Record Class) and Preview cannot be used at the same time. When using Preview, be sure to close the Web(USB) camera with the Record.Close method and then reconnect to the camera using Preview.Open.

See Also

Preview Members | Newtone.ImageKit.Wpf.WebCamera.Preview

 

The ImageKit WPF is created by Newtone Corporation