Cannot call Camera function [modified]
-
I need help with this function showDialog(). I'm using this to call camera function in my system.Before this i'm using TDS Nomad with window mobile 6 there is no problem with the system and now i'm chnging to new motorola FR68 with window mobile 6.1 it cannot display the camera.It show an error "invalid argument".Is there any different between WM 6 and WM 6.1. This is my code..
Dim ccd As New CameraCaptureDialog
ccd.Resolution = New Size(50, 100)
ccd.Mode = CameraCaptureMode.Still
ccd.StillQuality = CameraCaptureStillQuality.High
ccd.ShowDialog()
If ccd.ShowDialog() = Windows.Forms.DialogResult.OK Then
If ccd.FileName <> String.Empty Then
PictureBox1.Image = New Bitmap(ccd.FileName)
ccd.Dispose()
End If
End Ifi get this error.. message An invalid argument was specified. Stack Trace at Microsoft.WindowsMobile.Forms.CameraCaptureDialog.LaunchCameraCaptureDialog() at Microsoft.WindowsMobile.Forms.CameraCaptureDialog.ShowDialog() at camera.Form1.Button1_Click_1() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at camera.Form1.Main() Can anybody help me with this.Thank alot.. :confused: :confused:
@h3aR
modified on Thursday, September 3, 2009 2:27 AM
-
I need help with this function showDialog(). I'm using this to call camera function in my system.Before this i'm using TDS Nomad with window mobile 6 there is no problem with the system and now i'm chnging to new motorola FR68 with window mobile 6.1 it cannot display the camera.It show an error "invalid argument".Is there any different between WM 6 and WM 6.1. This is my code..
Dim ccd As New CameraCaptureDialog
ccd.Resolution = New Size(50, 100)
ccd.Mode = CameraCaptureMode.Still
ccd.StillQuality = CameraCaptureStillQuality.High
ccd.ShowDialog()
If ccd.ShowDialog() = Windows.Forms.DialogResult.OK Then
If ccd.FileName <> String.Empty Then
PictureBox1.Image = New Bitmap(ccd.FileName)
ccd.Dispose()
End If
End Ifi get this error.. message An invalid argument was specified. Stack Trace at Microsoft.WindowsMobile.Forms.CameraCaptureDialog.LaunchCameraCaptureDialog() at Microsoft.WindowsMobile.Forms.CameraCaptureDialog.ShowDialog() at camera.Form1.Button1_Click_1() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at camera.Form1.Main() Can anybody help me with this.Thank alot.. :confused: :confused:
@h3aR
modified on Thursday, September 3, 2009 2:27 AM
Remove the resolution parameter and see if it works. I speculate your second WM device may not support that resolution.
Joel Ivory Johnson
Meet my dev team: RDA Architecture Evangelist Team Blog
My site: J2i.net
Twitter: J2iNet