473,543 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to identify a FolderBrowserDi alog?

I'm trying to create a program that dynamicly saves and loads path of a
FolderBrowserDi alog , but I ran into a problem. Since
FolderBrowserDi alog 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 FolderBrowserDi alog 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 1864
I don't understand why you have multiple instances of a
FolderBrowserDi alog. 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.co m

<ho****@gmail.c om> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
I'm trying to create a program that dynamicly saves and loads path of a
FolderBrowserDi alog , but I ran into a problem. Since
FolderBrowserDi alog 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 FolderBrowserDi alog 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 FolderBrowserDi alog so I won't
lose the "SelectedPa th" 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.co m

<ho****@gmail.c om> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
I want to user multiple instances of the FolderBrowserDi alog so I won't
lose the "SelectedPa th" 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
1852
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 the FolderBrowserDialog after I opened the database connection no folders will be displayed in the FolderBrowserDialog. It's empty.
25
2178
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false; folderDialog.ShowDialog(); Setting ShowNewFolderButton to false does bugger all. If I set this to false it is STILL shown. Genius.
1
14471
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 = System.Environment.SpecialFolder.MyComputer; folderBrowserDialog1.SelectedPath = "D:\\"; folderBrowserDialog1.ShowDialog();
9
2413
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 folderBrowserDlg; OpenFileDialog openFileDlg;
0
1563
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 FolderBrowserDialog dialog to select a folder. This works fine if we do not preceed the dialog with a CString.Format call. When we have the call, the folder...
6
1777
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 component (or even a COM) available to select from in the "Customize Toolbox" window! I noticed there is a RESET button on the "Customize Toolbox"...
12
5837
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 FolderBrowserDialog and nothing else. When I start the application and hit EXIT everything works fine. However if it display the FBD box (even if I don't pick a...
3
22301
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 don't want to choose a SpecialFolder for my FolderBrowserDialog). I hope I've been clear. Thanks in advance
2
3146
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 is hidden behind them. The problem seems to occur only after using the FolderBrowserDialog. Has anyone seen this before? Thanks
0
7399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7729
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
4884
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3385
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
952
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
626
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.