制作手电筒功能
添加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
© 版权声明
文章版权归作者所有,未经允许请勿转载。