Wednesday, January 7, 2009

How to check if the OpenDialog is cancelled

How to check if the OpenDialog is cancelled

To check if the OpenDialog is cancelled try the following code

if (openXLFile.ShowDialog() == DialogResult.Cancel) {

MessageBox.Show("You have cancelled the dialog! Please select a file");

}

0 comments:

kbAlertz.com :: Visual Studio 2005

kbAlertz.com :: Visual Studio 2008

kbAlertz.com :: Visual Basic 2005