If you do not abort the dialog and select a file then press ok, the report is NOT shown.
Why is that?
Code: Select all
// create new dialog
OpenFileDialog objOpenFileDialog = new OpenFileDialog();
// set filter settings for the dialog
objOpenFileDialog.Filter = "Executables (*.exe)|*.exe";
// show dialog
DialogResult objFileSelect = objOpenFileDialog.ShowDialog();
// clean up
objOpenFileDialog.Dispose();
// debug message for report
Report.Info("Script","done");