Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Looking for a VB.NET Replacement for the DriveList Control

Posted on 2003-11-19
17
Medium Priority
?
423 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 500 total points
ID: 9786872
What VS version are you using? 2002 or 2003?
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 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