how can i fill Combobox with Logical Drives when app start(Form_Load)
Printable View
how can i fill Combobox with Logical Drives when app start(Form_Load)
Private Sub Forn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim drives() As String
drives = Directory.GetLogicalDrives
Dim iDrive As Integer
DrivesList.Items.Clear()
On Error Resume Next
For iDrive = 0 To drives.GetUpperBound(0)
DrivesList.Items.Add(drives(iDrive))
Next
DrivesList.SelectedIndex = 1
End Sub
Thanks that work :D