有源码,只是没有传呀?这就是,其实没什么,主要是调用函数。
Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As LongPrivate Sub Command1_Click()
Dim a, b, c, d, free, total As Long
Dim disk As String
disk = Text1.Text
GetDiskFreeSpace disk, a, b, c, d
total = d * b * a / 1024 / 1024
free = c * a * b / 1024 / 1024
Label4.Caption = total & "MB"
Label5.Caption = free & "MB"
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Label4.Caption = ""
Label5.Caption = ""
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Timer1_Timer()
Label6.Left = Label6.Left + 50
If Label6.Left >= Form1.Width Then
Label6.Left = -Label6.Width
End If
End Sub
另外我在一本API函数电子书与大家分享. 大家要跟帖呀。。。。。。。。。。。。。。。。。。
vbapi.rar
(956.42 KB)