Sub Camera1_Ready (Success As Boolean)
If Success Then
Dim w As Int = 100000
Dim h As Int = 100000
For Each cs As CameraSize In CamEx.GetSupportedPicturesSizes
If w>cs.Width Then w=cs.Width
If h>cs.Height Then h=cs.Height
Next
CamEx.SetPictureSize(w,h)
CamEx.SetJpegQuality(100)
CamEx.SetContinuousAutoFocus
CamEx.CommitParameters
CamEx.StartPreview
Else
ToastMessageShow("Cannot open camera.", True)
End If
End Sub