I am getting an error using the CameraCaptureDialog class in the ES400, while catpturing the second image it says “Could not find image”. But the same code works fine in MC35.
Dim app_path As String
Dim ccd As New CameraCaptureDialog
Dim count As Integer
count = TransImagelst.Images.Count
Try
ccd.Owner = Me
ccd.DefaultFileName = "Image" & count.ToString & ".jpg"
ccd.Mode = CameraCaptureMode.Still
ccd.StillQuality = CameraCaptureStillQuality.Low
ccd.Resolution = New Size(0, 0)
ccd.Title = "Image"
ccd.InitialDirectory = DataBase_Path & "\" & Region & "\Image"
ccd.ShowDialog()
'add files to image directory.
If Not Directory.Exists(DataBase_Path & "\" & Region & "\Image") Then Directory.CreateDirectory(DataBase_Path & "\" & Region & "\Image")
If ccd.FileName String.Empty Then
TransImagelst.ImageSize = New Drawing.Size(55, 55)
TransImagelst.Images.Add(New Bitmap(ccd.FileName))
TransImagelstv.View = View.LargeIcon
TransImagelstv.LargeImageList = TransImagelst
Dim lv As New ListViewItem("Image" & TransImagelst.Images.Count - 1)
TransImagelstv.Items.Add(lv)
lv.ImageIndex = TransImagelst.Images.Count - 1
End If
Please help me out.
I had the same problem. Although ES400 is stuffed with features, it does not work with the Cameracapturedialog. It does not even support the Imaging library in the Motorla EMDK SDK. This is baffeling.
The EMDK Programmers Guide has an ES400 Programming entry which states – You must use Microsoft’s DirectShow for capturing images. I tried this approach, but I could only get VGA resolution which is rubbish for my purpose. If this is sufficient for you, you might have a look at http://alexmogurenko.com/blog/directshownetcf/. I am extremely disappointed of the ES400 on this point.
I ended up using a simple soliution that is a bit rubbish, but at least it works (see outline below and good luck).