Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Windows Mobile: CameraCaptureDialog Alternative

0.00/5 (No votes)
19 Oct 2012 3  
This is not really an alternative but a different approach if you need the user to take multiple pictures in one session and then return to your application.

This is not really an alternative but a different approach if you need the user to take multiple pictures in one session and then return to your application.

The code starts the Camera application in background and waits for the minimize/close of the Camera dialog. If you first launch the camera using “pimg.exe -camerakey” the camera dialog shows a live preview (liveview). If you press the Enter key, you will get a snapshot and the camera dialog shows a preview of the image (imageview).

 

   

The screenshot for liveview does not show the real preview.

If you click (OK) in liveview, the dialog is hidden. If you click (OK) in imageview, the liveview is displayed.

The demo app shows only two buttons and a listbox.

When you click [Start], the pimg.exe is started and comes into front. The showCamera application remains in the background and waits for the ‘exit’ of the camera application.

showCamera also uses FileSystemWatcher (opennetcf) to watch for the new photo files taken. When the camera app is ‘closed’, a listbox shows the new photos.

Attached is the full C# source code (VS2008, WM 6.5.3, CF3.5) including a binary.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here