Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
       Dim drive As New System.IO.DriveInfo("C")
       If drive.IsReady Then
           Me.Label1.Text = String.Format("呼び出し側が利用できるバイト数:{0}", drive.AvailableFreeSpace)
           Me.Label2.Text = String.Format("ドライブ全体のバイト数:{0}", drive.TotalSize)
           Me.Label3.Text = String.Format("ドライブ全体の空きバイト数:{0}", drive.TotalFreeSpace)
       End If
   End Sub

タグ:

+ タグ編集
  • タグ:
最終更新:2018年05月14日 21:29