Solved

Looking for a VB.NET Replacement for the DriveList Control

Posted on 2003-11-19
17
411 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
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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now