dxCameraControl控件(拍照)
拍照演示
主要属性设置
Active:True
DeviceIndex:设备号,默认为0
其他方法
procedure Capture; //捕获 procedure Pause; //暂停 procedure Play; //播放 procedure Stop; //停止 property State: TdxCameraControlState read FState; //设备状态
设计界面
代码
//拍照并在cxImage中显示 procedure TForm1.Button1Click(Sender: TObject); begin dxCameraControl1.Capture; cxImage1.Picture.Assign(dxCameraControl1.CapturedBitmap); end; //保存图片 procedure TForm1.Button3Click(Sender: TObject); begin if SavePictureDialog1.Execute then begin cxImage1.Picture.SaveToFile(SavePictureDialog1.FileName); end; end;
拍照演示
本文来自博客园,作者:liessay,转载请注明原文链接:https://www.cnblogs.com/liessay/p/5267247.html