Windows Mobile 获取摄像头
1
CameraCaptureDialog cameraCapture = new CameraCaptureDialog();2

3
cameraCapture.Owner = null;4
//视频路径5
cameraCapture.InitialDirectory = @"\My Documents";6
//视频名称7
cameraCapture.DefaultFileName = @"test.3gp";8
//标题9
cameraCapture.Title = "Camera Demo";10
cameraCapture.VideoTypes = CameraCaptureVideoTypes.Standard;//.All;//.Messaging;11
cameraCapture.Resolution = new Size(176, 144);12
//时间长度TimeSpan(小时,分钟,秒)13
cameraCapture.VideoTimeLimit = new TimeSpan(0, 0, 15); // Limited to 15 seconds of video.14
cameraCapture.Mode = CameraCaptureMode.VideoWithAudio;15

16
if (DialogResult.OK == cameraCapture.ShowDialog())17

{18
Console.WriteLine("The picture or video has been successfully captured to:\n{0}", cameraCapture.FileName);19
}
浙公网安备 33010602011771号