Windows モバイル アプリケーションを使用しています。まさに Microsoft.WindowsMobile.Samples.CECamera です。
画像をキャプチャすると、正常にキャプチャされたことを示すダイアログ フォームが表示され、[OK] をクリックする必要があります。コードでは、この OK クリックを使用して画像の保存を続行しています... このメッセージが表示されないようにします。または、そのOKボタンを自動的にクリックするその他の方法。
if (DialogResult.OK == cameraCapture.ShowDialog())
{
string fileName = cameraCapture.FileName;
// If it is a video we rename the file so that it has the user entered
// default filename and the correct extension.
if (cameraCapture.Mode != CameraCaptureMode.Still)
{
string extension = fileName.Substring(fileName.LastIndexOf("."));
string directory = "";
if (fileName.LastIndexOf("\\") != -1)
{
directory = fileName.Substring(0, fileName.LastIndexOf("\\") + 1);
}
fileName = directory + this.textDefaultFileName.Text + extension;
System.IO.File.Move(cameraCapture.FileName, fileName);
}
// The method completed successfully.
MessageBox.Show("The picture or video has been successfully captured and saved to:\n\n" + fileName,
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
}
}