I have an issue with dialog forms. Below is a section of C# code which calls the FolderBrowserDialog window. Now when I click "ok" on a folder it will close the dialog so not concerned about that so much. However does anyone know how to detect the cancel event? I have tried looking it up but all I seem to be able to find is "dismiss." Not sure that can help me.
private void link1add_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog(); // Opens Folderdialog
}
For example something along these lines:
private void link1add_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog(); // Opens Folderdialog
if (dialog == dialog.Cancel)
{
}
}
If anyone could shed some light on this I would be very greatful. Thank you for looking.