キャプチャーモードでWeb(USB)カメラと接続します。
[Visual Basic]
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

[C#]
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);

パラメータ

fileName
保存するファイルの名称
videoDevice
Web(USB)カメラの名称
index
Web(USB)カメラのインデックス
outputControl
映像出力先のコントロール

戻り値

成功の場合は true 、失敗の場合は false を返します。

解説

パラメータの fileName で指定されたファイルに AVI または WMV 形式で動画が保存されます。保存形式は Format プロパティで設定します。
パラメータの videoDevice や index には GetVideoDevices メソッドで取得されるデバイスの名称や string 型の配列のインデックスを渡します(複数ある場合はそのうちの一つ)。videoDevice や index のないメソッドを使用すると GetVideoDevices メソッドで取得される先頭のデバイスを使用します。
パラメータの outputControl には映像出力先のコントロールを渡します。outputControl のないメソッドを実行すると Record コントロール内に映像が出力されます。
戻り値が true の場合、State プロパティが更新されます。
戻り値が false の場合、ErrorStatus プロパティには DirectX, Step, Connect, Interface が設定されます。

注意事項
プレビュー(Preview クラス)とキャプチャーを同時に行うことはできません。キャプチャーを行う場合は Preview.Close を実行して一旦Web(USB)カメラとの接続を閉じ、再度 Record.Open を実行して接続してください。

参照

Record メンバ | Newtone.ImageKit.Win.WebCamera.Record