为什么使用inet控件传输数据,其StateChanged事件始终是icReceivingResponse状态?
Private Sub Command1_Click()
Command1.Enabled = False
Me.MousePointer = 11
If Len(Text1.Text) > 5 Then
Text2.Text = Inet1.OpenURL(Text1.Text, icString)
Else
MsgBox "输入网址错误"
End If
End Sub
Private Sub Form_Terminate()
If Inet1.StillExecuting Then
Inet1.Cancel
End If
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case icConnecting
Label2.Caption = "正在建立连接......"
Case icConnected
Label2.Caption = "建立连接成功"
Case icReceivingResponse
Label2.Caption = "正在传输数据......"
Case icError
Label2.Caption = "传输中发生错误"
Case icDisconnected
Label2.Caption = "数据传输完毕"
Me.MousePointer = 0
Command1.Enabled = True
End Select
End Sub