By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

How do I test if the user clicked cancel on a FolderBrowserDialog ?

P: n/a
I need to find a way to see if the user clicked cancel on a FolderBrowserDialog. Thanks for any help.

Trevor

From http://www.developmentnow.com/g/38_0...nguages-vb.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Check the return value of the ShowDialog() method for DialogResult.Cancel.

"Trevor" <no****@developmentnow.com> wrote in message
news:ac**********************************@msnews.m icrosoft.com...
I need to find a way to see if the user clicked cancel on a
FolderBrowserDialog. Thanks for any help.

Trevor

From http://www.developmentnow.com/g/38_0...nguages-vb.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #2

P: n/a
"Trevor" <no****@developmentnow.com> schrieb:
I need to find a way to see if the user clicked cancel on a
FolderBrowserDialog.


\\\
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.Cancel Then
...
Else
...
End If
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Thanks, it worked great. I have an issue though. I am using vs 2005 and through the debug process, I sometimes don't get any FolderBrowserDialog boxes shown. So the program waits for the user to click ok/cancel but won't show the dialog. But through the release version it works as expected. Any ideas why?

From http://www.developmentnow.com/g/38_2...serDialog-.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.