Solved

Looking for a VB.NET Replacement for the DriveList Control

Posted on 2003-11-19
17
410 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 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

25 Experts available now in Live!

Get 1:1 Help Now