Sub camPanel_Ready (Success As Boolean)
If Success Then
camEx.SetContinuousAutoFocus
camEx.SetJpegQuality(ShareCode.DEVICE_DEF_QUALITY)
camEx.SetPictureSize(ShareCode.DEVICE_DEF_IMG_WIDTH,ShareCode.DEVICE_DEF_IMG_HEIGHT)
camEx.CommitParameters
camEx.StartPreview
HasFocus = False
btnFocus.Enabled = False
Dim fm As List = camEx.GetSupportedFocusModes
For n=0 To fm.Size -1
If fm.Get(n) = "auto" Then
HasFocus = True
btnFocus.Enabled = True
End If
Next
Else
ToastMessageShow("Error opening camera.", True)
End If
End Sub