Solved

Looking for a VB.NET Replacement for the DriveList Control

Posted on 2003-11-19
17
418 Views
Last Modified: 2007-12-19
The title pretty much says it all.  I'm working on a project where I need to select a drive to scan and would like something a little more graphical than putting drive letters in a ComboBox.  If the solution is in a language other than VB, I will need help implementing it.  Hopefully this is pretty simple but I need to get the answer pretty quickly.  That's why I'm offering the high number of points.



0
Comment
Question by:gandalf97
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
17 Comments
 
LVL 12

Expert Comment

by:roverm
ID: 9785264
You can use the DirListBox.

Rightclick your Toolbar while in designmode, choose Add/Remove items and select 'DirListBox'.
Now you will see it in your toolbar and you can drag it onto your form.

D'Mzz!
RoverM
0
 
LVL 2

Author Comment

by:gandalf97
ID: 9786846
I found something called "DirList" but not "DirListBox".  When I added it to the toolbox it went on OK but didn't have an icon.  Trying to drag it to my form gave me the error "Library not Registered".  I also looked under the additional MS controls but didn't see "DirListBox".  So, I'm still stuck.

0
 
LVL 12

Assisted Solution

by:roverm
roverm earned 125 total points
ID: 9786872
What VS version are you using? 2002 or 2003?
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 12

Expert Comment

by:roverm
ID: 9786900
It's in the Global Assembly Cache (2003).
0
 
LVL 2

Author Comment

by:gandalf97
ID: 9786958
OOPs!  I forgot to thank you for the help.  Apologies.

If it matters, I am using VS.NET as my development environment, version 7.0.something and version 1.0 of the .NET Framework.

0
 
LVL 12

Expert Comment

by:roverm
ID: 9786974
Hmm, that could be it.
I am using framework 1.1.

0
 
LVL 12

Expert Comment

by:roverm
ID: 9786975
btw : no need for apologies ;-)
0
 
LVL 28

Accepted Solution

by:
iboutchkine earned 125 total points
ID: 9788333
You can list drives to Listbox

 Dim dirInfo As System.IO.Directory
    Dim drive As String
    Me.ListBox1.Items.Clear()
    Dim drives() As String = dirInfo.GetLogicalDrives()
    For Each drive In drives
        Me.ListBox1.Items.Add(drive)
    Next
0
 
LVL 2

Author Comment

by:gandalf97
ID: 9788423
So, if the control is in the Global Assembly Cache, would upgrading my Framework to 1.1 do the trick or do I need to upgrade my entire Visual Studio? :-(

Thanks for the tip on adding the drives to a regular listbox.  I was hoping that I could do something that showed icons on the list depending on what drive type it was.  That's why I was looking for that control.

0
 
LVL 2

Author Comment

by:gandalf97
ID: 9789131
After researching this further, MS says that the DriveListBox control has been replaced by the OpenFileDialog control in VB.NET.  Somewhere else I read that the rationale behind this is because the control was used to drill down into directories and eventually open files... thus the OpenFileDialog replaces 3 controls.  If all I want is a nice graphical way to select a disk drive, will the OpenFileDialog work?  I don't have VS at work to check.  Thanks.
0
 
LVL 12

Expert Comment

by:roverm
ID: 9789344
Sure, the OpenFileDialog will work and you will see all files as well.
You can even add filters on what files to show.

But migrating to Framework 1.1 has nothing to do with VS.
You can install it no problem.

The only thing is that some application that are built on 1.0 can give some errors. A recompile will fix that.
I had this once.

D'Mzz!
RoverM
0
 
LVL 12

Expert Comment

by:roverm
ID: 9795838
Take a look here:
http://www.mentalis.org/soft/class.qpx?id=3

Maybe you can use it.

D'Mzz!
RoverM
0
 
LVL 12

Expert Comment

by:roverm
ID: 9802883
Any progress here?
0
 
LVL 2

Author Comment

by:gandalf97
ID: 9811060
I'm looking into alternatives but it looks like the "best" answer for me may be to create my own control.  I'll probably have more time todayt to work on this.

Eric
0
 
LVL 12

Expert Comment

by:roverm
ID: 9811312
Why do you want to create your own control?
Didn't our examples work?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10268216
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: iboutchkine {http:#9788333} & roverm {http:#9795838}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question