I use the following code to get a list of letters for each drive on my computer. I want to get the drive letter from the CD from this list. How to check it?
The code I use to get the list is as follows:
In the Form.Load event:
cmbDrives.DropDownStyle = ComboBoxStyle.DropDownList Dim sDrive As String, sDrives() As String sDrives = ListAllDrives() For Each sDrive In sDrives Next cmbDrives.Items.AddRange(ListAllDrives())
. ,.
Public Function ListAllDrives() As String() Dim arDrives() As String arDrives = IO.Directory.GetLogicalDrives() Return arDrives End Function
source share