关于VB的实时错误40006,望高手指点!我用的是TCP协议。
这是我的部分代码客户端:PrivateSubCommand2_Click()IfText1.Text=""OrText2.Text=""OrLen(Text1.Text)...
这是我的部分代码
客户端:
Private Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Len(Text1.Text) < 4 Then
MsgBox "请正确填写您的ID和密码!", 16, "错误"
else
Winsock1.SendData "yanz" & Text1.Text & Text2.Text
End If
End Sub
Private Sub Form_Load()
Winsock1.RemoteHost = "192.168.1.99"
Winsock1.RemotePort = 2001
Winsock1.LocalPort = 2020
Winsock1.Connect
With Winsock2
.LocalPort = 2000
.Listen
End With
End Sub
服务端:
Private Sub Form_Load()
With Winsock2
.LocalPort = 2001
.Listen
End With
End Sub 展开
客户端:
Private Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Len(Text1.Text) < 4 Then
MsgBox "请正确填写您的ID和密码!", 16, "错误"
else
Winsock1.SendData "yanz" & Text1.Text & Text2.Text
End If
End Sub
Private Sub Form_Load()
Winsock1.RemoteHost = "192.168.1.99"
Winsock1.RemotePort = 2001
Winsock1.LocalPort = 2020
Winsock1.Connect
With Winsock2
.LocalPort = 2000
.Listen
End With
End Sub
服务端:
Private Sub Form_Load()
With Winsock2
.LocalPort = 2001
.Listen
End With
End Sub 展开
2011-01-31
展开全部
服务端错误. 需要重新安装
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询