471,315 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 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 1773
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by hhh12347 | last post: by
6 posts views Thread by John Krueger | last post: by
reply views Thread by rosydwin | last post: by

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.