以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何获取硬盘的内存  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=185741)

--  作者:lxhmax
--  发布时间:2023/3/14 10:07:00
--  如何获取硬盘的内存
请问老师,如何获取硬盘剩余的内存?
--  作者:有点蓝
--  发布时间:2023/3/14 10:15:00
--  
Dim drives() As System.IO.DriveInfo = System.IO.DriveInfo.GetDrives()
For Each drive As System.IO.DriveInfo In drives
    Output.Show(drive.Name & "=" & drive.TotalFreeSpace / (1024 * 1024) & " M")
Next