1884.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:h_c_chan@hotmail.com">陈凯程</a> on February 08, 1998 at 04:41:29:<p>In Reply to: <a href="1883.html"><b>如何得知磁碟剩余空间</b></a> posted by VB菜鸟 on February 08, 1998 at 02:43:33:<p>: 各位VB高手:<p>: 要如何才能得知硬碟及软碟的剩余空间 ,希望不吝赐教 ! <p>用以下的程式码吧!<p>Private Declare Function DISKSPACEFREE Lib "stkit432.DLL" () As Long<p>Public Function DiskSpace(DriveName As String) As Long<br>    Dim CurrentDir As String<br>    Dim StartDrive As String<br>    StartDrive = Left(CurDir$, 2)<br>    On Error GoTo CheckDiskError<br>    CurrentDir = Dir$(DriveName + "\*.*")<br>    ChDrive DriveName<br>    DiskSpace = DISKSPACEFREE()<br>    On Error GoTo 0<br>    ChDrive DriveName<br>    Exit Function<br>CheckDiskError:<br>    DiskSpace = -Err<br>    On Error GoTo 0<br>    Err = 0<br>    Exit Function<br>End Function<p>希望能帮到您,若有错误的话,请多多指教!<br><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 1884--></ul><!--end: 1884--><br><HR><p></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?