473,320 Members | 1,865 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,320 software developers and data experts.

How to identify a FolderBrowserDialog?

I'm trying to create a program that dynamicly saves and loads path of a
FolderBrowserDialog , but I ran into a problem. Since
FolderBrowserDialog is not a Control, therefore it doesn't have
attribute such as Name. How do I get the name of a Component or unique
string to identify each FolderBrowserDialog instances in the my form.
I tried GetHashCode() but that doesn't work out too well.

Any suggestion is apreaciated!!!

Thanks

Dec 7 '05 #1
4 1850
I don't understand why you have multiple instances of a
FolderBrowserDialog. It's a dialog, meaning it is modal, which means that
only one dialog can be shown at a time.

Given this, why do you have multiple instances? Do you have a bunch of
different settings? If this is the case, I would just have a structure or a
class which holds the settings, and key those by whatever name you wish.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ho****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I'm trying to create a program that dynamicly saves and loads path of a
FolderBrowserDialog , but I ran into a problem. Since
FolderBrowserDialog is not a Control, therefore it doesn't have
attribute such as Name. How do I get the name of a Component or unique
string to identify each FolderBrowserDialog instances in the my form.
I tried GetHashCode() but that doesn't work out too well.

Any suggestion is apreaciated!!!

Thanks

Dec 7 '05 #2
I want to user multiple instances of the FolderBrowserDialog so I won't
lose the "SelectedPath" value between them

Dec 7 '05 #3
That's a waste of a good deal of resources just to store that. Why not
store the path as a string and then set the properties of the dialog when
you need to?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ho****@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
I want to user multiple instances of the FolderBrowserDialog so I won't
lose the "SelectedPath" value between them

Dec 7 '05 #4
thanks for your help!!!

Dec 7 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Anja | last post by:
I have installed the new Visual Studio 2003 and implemented the FolderBrowserDialog. Everything works fine, if I open the FolderBrowserDialog before opening a Database Connection. If I open...
25
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false;...
1
by: alf | last post by:
Hi, I am using a FolderBrowserDialog to allow the user to select a folder as follows: FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog(); folderBrowserDialog1.RootFolder =...
9
by: hhh12347 | last post by:
FolderBrowserDialog crashes on my Windows 2000 computer. Here is a C# test program: using System; using System.Windows.Forms; public class TestForm : Form { FolderBrowserDialog...
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...
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...
12
by: JohnR | last post by:
I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a...
3
by: antuantuan | last post by:
Hi. How can I initialize a FolderBrowserDialog choosing a particular RootFolder? I saw that FolderBrowserDialog has a RootFolder member, but it accepts only an Environment.SpecialFolder (but I...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.