'获取媒体的长度 00:00
Public Function GetMusicLengthString(FileName As String) As String
Dim RefStr As String * 80
mciSendString "status " & FileName & " length", RefStr, 80, 0
GetMusicLengthString = CStr(Format(Int(Val(RefStr) \ 1000 \ 60), "00") & ":" & Format(Val(RefStr) \ 1000 Mod 60, "00.") & Val(RefStr) \ 100 Mod 10)
End Function
Public Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
可以直接通过每秒字节数换算
参考