Private Declare Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (ByVal lpFileName As String, lpFileSizeHigh As Long) As Long
Private Sub Command3_Click()
OperationStyle = 2
Inet1.Execute , "size wq.rar"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case 1
Text1.Text = "is looking"
Case 2
Text1.Text = "success finding "
Case 3
Text1.Text = "is connecting"
Case 4
Text1.Text = "success connected"
Case 5
Text1.Text = "is sending request"
Case 6
Text1.Text = "sucess sending"
Case 7
Text1.Text = "is receiving"
Case 8
Text1.Text = "success receive"
Case 9
Text1.Text = "is disconnecting"
Case 10
Text1.Text = "success disconnect"
Case 11
Text1.Text = "is error"
Case 12 'icResponseCompleted
Text1.Text = "success receive data"
Select Case OperationStyle
Case 2
filesize = Inet1.GetChunk(1024, 0)
MsgBox CStr(filesize)
Case Else
End Select
End Select
End Sub
Private Sub Command1_Click()
Dim fso, f
Set fso = CreateObject("scripting.filesystemobject")
Set f = fso.getfile("c:\new.mdb")
MsgBox f.Size & "字节"
End Sub