Search
Submit & Win
Submit and win
Cash Prizes !
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Codes Author
Sat, 20-Dec-2014 Authors
All Time Authors
Satyapriyanayak
12160
Vishal@Neeraj
10880
Jayakumars
8120

Latest members | More ...


(Statistics delayed by 5 minutes)
 Codes

Find Driver Details in VB.NET

Santosh4u
Posted by Santosh4u under Windows Forms on 10/26/2009 12:32:11 AM | Views : 2667 | Status : [Member]

Below Code will Help you to Find the Driver Details of your System.
VB.NET

For Each objdriveinfo As DriveInfo In DriveInfo.GetDrives()

If objdriveinfo.Name = "A:\" Or objdriveinfo.Name = "G:\" Then
Else
ListBox1.Items.Add(objdriveinfo.Name & " " & System.Math.Round((objdriveinfo.TotalFreeSpace /
1073741824), 2) & "GB" & " " & System.Math.Round((objdriveinfo.TotalSize / 1073741824), 2) & "GB" &
" " & objdriveinfo.DriveFormat & " " & objdriveinfo.VolumeLabel & "")
End If
Next

C#.NET
 foreach (DriveInfo objdriveinfo in DriveInfo.GetDrives())

{
if (objdriveinfo.Name == "A:\\" || objdriveinfo.Name == "G:\\")
{
}
else
{
ListBox1.Items.Add(objdriveinfo.Name + " " + System.Math.Round((Double)
(objdriveinfo.TotalFreeSpace / 1073741824), 2) + "GB" + " " + System.Math.Round((Double)
(objdriveinfo.TotalSize / 1073741824), 2) + "GB" + " " + objdriveinfo.DriveFormat + " "
+ objdriveinfo.VolumeLabel + "");
}

}

Regards
Santosh


Share this to:

Bookmark It

Comments or Responses


Login to post response