如题

解决方案 »

  1.   

    怎么没人啦?我用下面的代码,但总提示“错误,仍在执行上一请求”,这到底是什么原因呀?===============================================Private Sub Command1_Click()
    Inet1.Execute "ftp://×.×.×.×", "size /file"End SubPrivate Sub Inet1_StateChanged(ByVal State As Integer)
       'State = 12 时,使用 GetChunk 方法检索服务器的响应。
       '该示例假定数据为文本类型。   Select Case State
       '...没有列举其它情况。   Case icResponseReceived '12
          Dim vtData As Variant '数据变量。
          Dim strData As String: strData = ""
          Dim bDone As Boolean: bDone = False      '取得第一块。
          vtData = Inet1.GetChunk(1024, icString)
          DoEvents
          Do While Not bDone
             strData = strData & vtData
             DoEvents
             '取得下一块。
             vtData = Inet1.GetChunk(1024, icString)
             If Len(vtData) = 0 Then
                bDone = True
             End If
          Loop      Text1.Text = strData
       End Select
       
    End Sub
      

  2.   

    Private Sub Command1_Click()
         Inet1.Execute "ftp://test:[email protected]", "SIZE test.txt"
        End Sub
         
        Private Sub Inet1_StateChanged(ByVal State As Integer)
         'State = 12 时,用 GetChunk 方法检索服务器的响应。
         
         Dim vtData As Variant ' Data variable.
         Select Case State
         '...没有列举其它情况。
         Case icError '11
         '出现错误时,返回 ResponseCode 和 ResponseInfo。
         vtData = Inet1.ResponseCode & ":" & _
         Inet1.ResponseInfo
         Case icResponseCompleted ' 12
         
         
         Dim strData As String
         Dim bDone As Boolean: bDone = False
         
         '取得第一个块。
         vtData = Inet1.GetChunk(1024, icString)
         DoEvents
         
         Do While Not bDone
         strData = strData & vtData
         '取得下一个块。
         vtData = Inet1.GetChunk(1024, icString)
         DoEvents
         
         If Len(vtData) = 0 Then
         bDone = True
         End If
         Loop
         MsgBox strData
         End Select
         
        End Sub