I am doing work that scans a barcode and gets the information behind it under Windows Mobile 6.5 and .net compact framework 2.0, using the CameraCaptureDialog class to capture the image from the phone’s camera, this is my code:
CameraCaptureDialog cameraCaptureDialog = new CameraCaptureDialog();
cameraCaptureDialog.Owner = this;
cameraCaptureDialog.Title = "";
cameraCaptureDialog.Mode = CameraCaptureMode.Still;
cameraCaptureDialog.InitialDirectory = dir;
cameraCaptureDialog.Resolution = new System.Drawing.Size(640, 480);
cameraCaptureDialog.DefaultFileName = "CodeBar.jpg";
if (cameraCaptureDialog.ShowDialog() == DialogResult.OK && cameraCaptureDialog.FileName.Length > 0)
{
curFileName = cameraCaptureDialog.FileName;
cameraCaptureDialog.Dispose();
}
, CaptureDialog, , , 2 , , , CaptureDialog , ? , ShowDialog() CaptureDialog , , , , CameraCaptureDialog ShowDialog(), DialogResult.OK