Click here to Skip to main content
15,885,141 members
Articles / Mobile Apps / Windows Mobile

Windows Mobile: CameraCaptureDialog Alternative

Rate me:
Please Sign up or sign in to vote.
4.00/5 (2 votes)
19 Oct 2012CPOL1 min read 14.6K   1  
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --