Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2006

Tip: Looking for answers? Try searching our database.

Browse for folders dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
google@russellmason.com - 06 Feb 2006 17:29 GMT
Hi

Does anyone know a way of showing an open folder dialog, as if being
opened on a remote computer?

e.g. When you go to create a new database in SQL Server Enterprise
Manager and browse for where you wish to put the data files a browse
dialog appears using the drives/folders of the remote server, not your
local machine.

Any idea as to how this is done?

Thanks
Russell Mason
Tim Scott - 07 Feb 2006 04:56 GMT
Russell,

Check out the FolderBrowserDialog, available in .NET 1.1 or later:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialo
g.aspx


-- Tim Scott
  http://geekswithblogs.net/tscott
google@russellmason.com - 07 Feb 2006 09:54 GMT
Hi

To my knowledge, the FolderBrowserDialog only shows folders/paths that
are available from the local machine. If a server has a share you can
get to it through the share name, however this is not what I'm after. I
would like to see C:\..., D:\... as if the dialog had been opened on
the server, this would be different from the structure shown on the
local machine. Again the only example of this I can point to is the way
SQL Server Enterprise Manager does it with new database files.

If the FolderBrowserDialog can do this then I would be greatful if you
could let me know how to set it up to use a file structure on another
machine.

Thanks
Russell Mason
Tim Scott - 08 Feb 2006 02:50 GMT
Russell,

Ah, I missed the remote part--sorry about that. I'm not aware of any
component that does that (except for the SQL dialog that you
mentioned).
You could write your own, but it would take a bit of time.

Is there a service or program running on the remote system?  You would
need some way to populate the dialog with the folder structure from the
remote.  Or, you could rely on the calling function having enough
rights to enumerate the folder structure remotely (but that may not be
possible).

Sounds like a fun challenge!

-- Tim Scott
  http://geekswithblogs.net/tscott
Dmytro Lapshyn [MVP] - 08 Feb 2006 11:20 GMT
Hey Russell,

I'm pretty sure that's not possible with FolderBrowserDialog. You obviously
should have something running on the remote machine that would tell you its
local file system structure. SQL Server does this behind the scenes, but
you'll have to come up with your own solution (possibly .NET
Remoting-based).

> Hi
>
[quoted text clipped - 12 lines]
> Thanks
> Russell Mason
google@russellmason.com - 08 Feb 2006 11:06 GMT
Hi

Just in case anyone wants to do the same I have found a solution.

I forgot to say I wanted to do this IN SQL Server, not just LIKE SQL
Server (Sorry Tim). I thought there may be a Windows Dialog for this
already but its really a database question.

Have a look at xp_availablemedia and xp_dirtree. These extended stored
procs allows you to get drive/folders structures (assuming you have the
correct SQL permissions). This is how SQL Enterprise Manager does it.
The UI part is down to me!

Thanks
Russell Mason

> Hi
>
[quoted text clipped - 10 lines]
> Thanks
> Russell Mason
Tim Scott - 09 Feb 2006 03:46 GMT
Russell,

The UI part sounded fun.  I started on a prototype before seeing your post
about the stored procs in SQL Server.  Good to know, by the way.

Anyway, I've done a prototype UI that is decoupled from the logic that
actually gets the file and folder list.  Right now it's listing local files
and folders, but you could move that code to pull from the SQL stored procs,
or get it via remoting.

You can download from
http://projectdistributor.net/Releases/Release.aspx?releaseId=313

There is much todo to make it ready for prime time, but enjoy!

-- Tim Scott
  http://geekswithblogs.net/tscott 

> Hi
>
[quoted text clipped - 26 lines]
> > Thanks
> > Russell Mason

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.