OK. I want to have just one button which takes the picture whether autofocus is supported or not. So I changed the Sub btnTakePicture_Click call to camEx.GetSupportedFocusModes and added to the CamEx sub which now reads as follows:
Public Sub GetSupportedFocusModes As List
r.target = parameters
Dim fm As List
fm.initialize
fm=r.RunMethod("getSupportedFocusModes")
If fm.Get(0)="auto" Then
FocusAndTakePicture
Else
TakePicture
End If
Return r.RunMethod("getSupportedFocusModes")
End Sub
So now there is just one button "Take Picture" button which works for both cameras - rear with autofocus and front without autofocus.
Thanks!