Drive Combo, Folder and File List Controls

Drive ComboBox

The Drive Combo box lists all the available drives on the PC. It's properties are almost identical to a Combo Box, except that it has a Drive property, and no Style property.

To get or set the current drive, use the Drive property:

Drive1.Drive = "C:"

or

Msgbox "The current drive is " & Drive1.Drive

When the current drive has changed, the Change event occurs. Note that when the drive changes, the control does not attempt to access it... so if there is no disk in the drive, it does not matter. (This will not be the case when we use the 3 controls together, and the Folder/Files list boxes attempt to read the disk!)

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”