Hi
First add the NameSpace as:- Microsoft.WindowsMobile.Forms
And writhe below code in a button Click event
CameraCaptureDialog cameraCapture = new CameraCaptureDialog();
cameraCapture.Owner = this;
cameraCapture.InitialDirectory = @"\My Documents\My Pictures";
cameraCapture.DefaultFileName = @"test2";
cameraCapture.DefaultFileName = cameraCapture.DefaultFileName + cecameraDefaultPictureExtension;
try
{
if (DialogResult.OK == cameraCapture.ShowDialog())
{
string fileName = cameraCapture.FileName;
MessageBox.Show("The picture has been successfully captured ");
Bitmap bmp = new Bitmap(cameraCapture.FileName);
pictureBox1.Image = bmp;
}
}
catch (ArgumentException ex)
{
}
PS.Shakeer Hussain Hyderabad