没有测试 这样试试 Private Sub Command1_Click() Dim a As String Dim str As String Dim RetCode As Long inet1.proxy="http://localhost:125" Inet1.Execute "http://localhost/xml/1.bmp" MsgBox Inet1.GetHeader("content-length") RetCode = Val(Mid(Trim(Inet1.GetHeader), 10, 3)) Select Case RetCode Case 200 MsgBox "成功了" Case 404 MsgBox "失败了" Case Else MsgBox "Error" End Select End Sub
这样试试
Private Sub Command1_Click()
Dim a As String
Dim str As String
Dim RetCode As Long
inet1.proxy="http://localhost:125"
Inet1.Execute "http://localhost/xml/1.bmp"
MsgBox Inet1.GetHeader("content-length")
RetCode = Val(Mid(Trim(Inet1.GetHeader), 10, 3))
Select Case RetCode
Case 200
MsgBox "成功了"
Case 404
MsgBox "失败了"
Case Else
MsgBox "Error"
End Select
End Sub
Inet1.GetHeader("content-length")
这里老是出现无法完成要求