473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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
3 4072
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alexander van Meerten | last post by:
Hello, I have to make an application that works on pc and apple mac. Therefore I am investigating if it's possible to use html/javascript. The database has 10000 records and is sequentially...
25
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false;...
5
by: Quinn | last post by:
When users clicked a unkown mime type link such as Zip on my website, a "Save/Open/Cancel" dialog box pops up. Is there a way to detect which button users clicked by using ASP? actually I only what...
0
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the...
0
by: Tommy Clark | last post by:
I am using Microsoft Development Environment 2003 Version 7.1.3088 and .NET Framework 1.1 Version 1.1.4322 SP1. I have an MFC application that we have ported to .NET and have added the...
3
by: buran | last post by:
Dear ASP.NET Programmers, I am loading a web user control ("taclient.ascx") into a placeholder (ID: phFA). The web user control contains a cancel button (ID: btnCancel). I would like to "unload"...
6
by: John Krueger | last post by:
The FolderBrowserDialog control in my toolbox has vanished! I did not delibratly remove it and it is just not there anymore. I tried to add it back to the toolbox but there isn't even a .NET...
2
by: Marcel Brekelmans | last post by:
Hi, I'm trying to display a MessageBox after a FolderBrowserDialog. I see that it gets displayed, but not activated. The form is not in front and when I have some other forms open the MessageBox...
1
by: haymansfield | last post by:
Hi, Im trying to capture the value the user inputs into the dialog box brought up when the onBeforeUnload event is given an event.ReturnValue. If the user selects ok i dont need to do...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.