Code sample to display the available drives on your computer in VB.NET
Here is an example written in Visual Basic that displays available drives on a computer. Few lines are enough to get the information. Add lines in your code to enhance your program if you wish.
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click For Each drive As System.IO.DriveInfo In System.IO.DriveInfo.GetDrives MessageBox.Show(drive.Name.ToString) Next End Sub End Class |
The example in this article uses a Windows Forms type. Using a Button1 is only intended to make the program attractive. Press Button1 to start viewing drives available. The program does not differentiate between different types of drives such as USB keys, DVD-ROM or SIM card.
Reference :
DriveInfo.GetDrives, m�thode (French)
DriveInfo.GetDrives Method (English)
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :