Get Driver Information Using MY Name space In VB.NET
Get Driver Information Using "MY" Name space In VB.NET
Rate Get Driver Information Using MY Name space In VB.NET
(2(2 Vote))
Dim _DCount As Integer = 0
_DCount = My.Computer.FileSystem.Drives.Count
Dim I As Integer = 0
Do While I < (_DCount)
Application.DoEvents()
ListBox1.Items.Add("Name" & vbTab & My.Computer.FileSystem.Drives(I).Name.ToString())
If My.Computer.FileSystem.Drives(I).IsReady = True Then
ListBox1.Items.Add("Type" & vbTab & _
My.Computer.FileSystem.Drives(I).DriveType.ToString())
ListBox1.Items.Add("Format Type" & vbTab & _
My.Computer.FileSystem.Drives(I).DriveFormat.ToString())
ListBox1.Items.Add("Root Directory" & vbTab & _
My.Computer.FileSystem.Drives(I).RootDirectory.ToString())
ListBox1.Items.Add("Label" & vbTab & _
My.Computer.FileSystem.Drives(I).VolumeLabel.ToString())
ListBox1.Items.Add("Total Size" & vbTab & _
(((My.Computer.FileSystem.Drives(I).TotalSize / 1024) / 1024) / 1024).ToString("#,##0.00") & "GB")
ListBox1.Items.Add("Available Free Space" & vbTab & _
(((My.Computer.FileSystem.Drives(I).AvailableFreeSpace / 1024) / 1024) / 1024).ToString("#,##0.00") & "GB")
ListBox1.Items.Add("Total Free Space" & vbTab & _
(((My.Computer.FileSystem.Drives(I).TotalFreeSpace / 1024) / 1024) / 1024).ToString("#,##0.00") & "GB")
Else
ListBox1.Items.Add("Driver Not Ready To Display Informations")
End If
ListBox1.Items.Add("")
I += 1
Loop
Me.Cursor = Cursors.Default
Get Driver Information Using MY Name space In VB.NET Comments
No comments yet — be the first to post one!
Post a Comment