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;

拍照演示

posted @ 2016-03-11 21:08  liessay  阅读(1283)  评论(0编辑  收藏  举报