VB问题,Inet1错误:仍在执行上一请求 200
下面VB程序当二次提交(速度较快时)出现"仍在执行上一请求"错误,整个程序会被迫关闭.如何检测从而避免这一错误出现呢?PrivateSubCommand1_Click()...
下面VB程序当二次提交(速度较快时)出现"仍在执行上一请求"错误,整个程序会被迫关闭.
如何检测从而避免这一错误出现呢?
Private Sub Command1_Click()
If Text1.Text = vCode Then
With Inet1
.URL = "http://www.bai.com/login.asp?id=8"
.UserName = Text2
.Password = Text3
.Execute , "post"'提示这里错误
End With
End If 展开
如何检测从而避免这一错误出现呢?
Private Sub Command1_Click()
If Text1.Text = vCode Then
With Inet1
.URL = "http://www.bai.com/login.asp?id=8"
.UserName = Text2
.Password = Text3
.Execute , "post"'提示这里错误
End With
End If 展开
展开全部
Dim iBusy As Boolean
Private Sub Inet1_StateChanged(ByVal State As Integer)
iBusy = State = icReceivingResponse
End Sub
Private Sub Command1_Click()
'接收应答时不响应用户操作
If iBusy Then Exit Sub
'其他代码
End Sub
=============
学习楼上的,更简单
Private Sub Command1_Click()
If Inet1.StillExecuting Then Exit Sub
'其他代码
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
iBusy = State = icReceivingResponse
End Sub
Private Sub Command1_Click()
'接收应答时不响应用户操作
If iBusy Then Exit Sub
'其他代码
End Sub
=============
学习楼上的,更简单
Private Sub Command1_Click()
If Inet1.StillExecuting Then Exit Sub
'其他代码
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Inet(Name)
Inet:
If Me(Name).StillExecuting = True Then DoEvents: GoTo Inet
End Sub
Private Sub Command1_Click()
Inet1.Execute "http://www.baidu.com"
Inet ("Inet1")
MsgBox Inet1.OpenURL
End Sub
Inet:
If Me(Name).StillExecuting = True Then DoEvents: GoTo Inet
End Sub
Private Sub Command1_Click()
Inet1.Execute "http://www.baidu.com"
Inet ("Inet1")
MsgBox Inet1.OpenURL
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询