I want to show the image that mobile phone's camera its taking on a control in a WinForm. The idea is that my application works like camera's program. I want to show the image like if the user is going to take a photo.
How can I do that? Can I do that?
If you need more details ask me.
Thank you!
To enable it, go to Settings > About Phone and tap on the 'Build number' 7 times. Launch the DroidCam app on your phone and make sure the phone is connected to the laptop or PC. Now launch the DroidCam Client on the PC and click on the 'USB' option.
If your PC and phone are on the same network, you can use an Android app to connect both devices and use the phone camera as a webcam. The app will register your Android phone as a webcam for the PC, so all apps that check your PC for webcam availability will use your Android phone camera instead.
Not very sure what you need, but you may try using Microsoft.WindowsMobile.Forms.CameraCaptureDialog:
string originalFileName;
using (CameraCaptureDialog dlg = new CameraCaptureDialog()) {
dlg.Mode = CameraCaptureMode.Still;
dlg.StillQuality = CameraCaptureStillQuality.Low;
//dlg.Resolution = new Size(800, 600);
dlg.Title = "Take the picture";
DialogResult res;
try {
res = dlg.ShowDialog();
}
catch (Exception ex) {
Trace.WriteLine(ex);
return null;
}
if (res != DialogResult.OK)
return null;
this.Refresh();
originalFileName = pictureFileName = dlg.FileName;
}
Later Edit: Some of you might find useful this link, too: http://community.intermec.com/t5/General-Development-Developer/CN50-MS-Camera-Capture-Dialog-generates-error/m-p/12881#M4083
What you want is a preview, not the capture, which is far more difficult. The best (and maybe only) solution is to insert a DShow Filter into the filtergraph to pipe the preview window to where you want.
COM is a bear in the Compact Framework, and DShow is tough no matter what platform you're on. There are some resources online, like the DShow.NET library at sourceforge, and Alex Mogurenko's blog, but nothing specific to creating a capture.
There is a native capture sample in the WinMo SDK that would be a useful guide to getting you there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With