我使用的是Windows Mobile應用程序..它到底是 Microsoft.WindowsMobile.Samples.CECamera如何在c#應用程序上的showdialog()上自動點擊確定按鈕?
當我抓住一個對話框的形式出現,告訴它成功抓獲,我應該單擊確定的圖像。 在代碼中,它使用這個好點擊繼續保存圖片... 現在我想這個消息停止出現。 或任何其他方法來自動點擊該確定按鈕。
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);
}
}
和自動點擊會關閉對話框?經過幾秒鐘? – Bastardo
在任何時間..我只是希望它消失實際上它是無用的..我只會處理盲人,所以他將無法看到這樣的消息,我想刪除它或自動處理它。 – emykindman