1886.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 22 行
HTML
22 行
<html>
<head>
<title>Re: 如何得知磁碟剩余空间</title>
</head>
<BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="red" VLINK="#808080" ALINK="">
<center>
<h1>Re: 如何得知磁碟剩余空间</h1>
</center>
<HR><p>
Posted by <a href="mailto:cww5@mail.ncku.edu.tw">cww</a> on February 08, 1998 at 17:40:39:<p>
In Reply to: <a href="1883.html"><b>如何得知磁碟剩余空间</b></a> posted by VB菜鸟 on February 08, 1998 at 02:43:33:<p>
<br>不用vb 所提供的stkit432.DLL的话可用以下方式(vb6 所提供的不是<br>srkit432.dll 而是vb6stkit.dll )<p>Declare Function GetDiskFreeSpace Lib "kernel32" _<br> Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, _<br> lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long<p><br>Dim aa As Long<br>Dim iSectors As Long, iByte As Long, iFree As Long, iTotal As Long<p>aa = GetDiskFreeSpace("c:", iSectors, iByte, iFree, iTotal)<br>'_________________^^^^<p>'更改成所需的磁碟代号 <br>Label1.Caption = iSectors * iByte * iFree<br>Label2.Caption = iSectors * iByte * iTotal<br>
<br>
<p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 1886-->
</ul><!--end: 1886-->
<br><HR><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?