Solved

Looking for a VB.NET Replacement for the DriveList Control

Posted on 2003-11-19
17
422 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
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 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