Using the VideoCamera Component

How to use the VideoCamera component.

To use the VideoCamera component:

Example of code generated by the form designer:

private Sybase.UnwiredPlatform.Windows.Device.VideoCamera videoCamera1;
this.videoCamera1 = new Sybase.UnwiredPlatform.Windows.Device.VideoCamera();

The following sample code for the event handler includes two buttons on the form: the first button captures a video and returns the video file name. The second button plays the video.

private void button1_Click(object sender, EventArgs e)
{
   This.FileName = this.videoCamera1.CaptureVideoFile(this);
   this.button2.Enabled = !String.IsNullOrEmpty(this.FileName);
}

private void button2_Click(object sender, EventArgs e)
{
   Sybase.UnwiredPlatform.Windows.Device.Process.OpenFile(this.FileName);
}