Delphi xe10 学习笔记1手电筒

delphi10年前 (2015)发布 admin
686 0

制作手电筒功能
添加CameraComponent控件、Switch控件
及以下代码

procedure THeaderFooterForm.Switch1Switch(Sender: TObject);
begin
      if switch1.IsChecked then  begin
        if cameracomponent1.HasFlash then
            cameracomponent1.TorchMode:=ttorchmode.ModeOn ;
      end else begin
        if cameracomponent1.HasFlash then
             cameracomponent1.TorchMode:=ttorchmode.ModeOff
      end;

end;

xe开发学习网站http://www.codedata.com.tw/
http://www.codedata.com.tw/mobile/android-6-tutorial-1-1

© 版权声明

相关文章