Ralfeus

Hello, everybody
I want to take a picture on iPAQ rw6815 (Windows Mobile 5.0). So I use CameraCaptureDialog instance to do that. It looks like this:

Code Snippet

CameraCaptureDialog camera = new CameraCaptureDialog();
camera.Mode = CameraCaptureMode.Still;
camera.ShowDialog();



The dialog appears, but no captured picture appears on the screen at all. Looks like it hangs. However it's possible to close this dialog and work with program.
Do I need anything else to take a picture from the camera
Thanks.



Re: Smart Devices VB and C# Projects + CameraCaptureDialog.Show() hangs

Mark Lu

Usually I also set:

Camera.Resolution = new Size(1280,1024);

Camera.StillQuality = CameraCaptureStillQuality.High;

Camera.InitialDirectory = "\";

Of those, I'm not sure which ones are required.





Re: Smart Devices VB and C# Projects + CameraCaptureDialog.Show() hangs

Ralfeus

Well, I'm not sure whether it helped, but now I'm able to make pictures. But now I met another problem. When I hold PDA vertically, the picture shown on the screen is turned by 90 degree. When I turn the PDA on 90 degree the picture turns on 180 degree... And at last when I make a picture, I get a "nice" result, which you can see on this link. Is it problem of specific vendor Does it mean CaptureCameraDialog doesn't support all cameras





Re: Smart Devices VB and C# Projects + CameraCaptureDialog.Show() hangs

Zero Dai - MSFT

Hi Ralfeus,

Actually, you need to set the resolution property before showing the dialog. The default value of this property is (0,0). So, if you don't set its value, you will catch nothing.

Furthermore, there exist well known issues that are with specific device related. In addition to yours, some device can not get resolution set corretly with CaptureCameraDialog. You can find a lot of similar topic in our forum by searching the key word.

Thanks,

Zero Dai - MSFT






Re: Smart Devices VB and C# Projects + CameraCaptureDialog.Show() hangs

Ralfeus

Actually it didn't change anything. I can make pictures, but still picture appears same as I have written before. What's interesting - I tried to run this program on two more PDAs with camera. They were Asus P525 and T-Mobile MDA Vario. On P525 on the ShowDialog() threw an InvalidOperationException. On T-Mobile ShowDialog() neither showed dialog nor threw an exception. ShowDialog() just immediately returned DialogResult.Cancel :-) So as for me seems like WM5 SDK is not a standard to implement yet.





Re: Smart Devices VB and C# Projects + CameraCaptureDialog.Show() hangs

Mark Lu

hey,

I cannot speak for your specific case or devices, but, try taking a look at this video. I followed the instructions here, and things seem to work on both my devices.


http://channel9.msdn.com/ShowPost.aspx PostID=209787