How to Get the Available Size of your Hard Drive in VB.Net
The program will identify the available size of your hard disk drive, You need a form, label, button and a progressbar. In my case, I only have 9 Gigabyte left in my storage.
The output will be like this:
Code:
Public Class frmGetSizeDrive
Dim CDrive As New HDDSize
Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
If CDrive.DriveSize > 1 Then
Label1.Text = CDrive.DriveSize & " GB"
Else
Label1.Text = CDrive.DriveSize & " MB"
End If
ProgressBar1.Value = CDrive.DriveSize
End Sub
End Class
How to Get the Available Size of your Hard Drive in VB.Net
Reviewed by code-dev
on
10:18 AM
Rating:
No comments: