vb不管怎么调都出现实时错误40006 10
能建立tcp连接但是发送数据就提示40006错误OptionExplicitPrivateSubCommand1_Click()Winsock1.RemoteHost="...
能建立tcp连接但是发送数据就提示40006错误
Option Explicit
Private Sub Command1_Click()
Winsock1.RemoteHost = "192.168.1.100"
Winsock1.RemotePort = "5000"
Winsock1.Close
Winsock1.Connect
Winsock1.SendData "aaa"
Command1.Enabled = False
MsgBox "连接成功"
End Sub
Private Sub Command2_Click()
Winsock1.Close
Command1.Enabled = True
End Sub
Private Sub Command3_Click()
Winsock1.SendData "aaa"
End Sub 展开
Option Explicit
Private Sub Command1_Click()
Winsock1.RemoteHost = "192.168.1.100"
Winsock1.RemotePort = "5000"
Winsock1.Close
Winsock1.Connect
Winsock1.SendData "aaa"
Command1.Enabled = False
MsgBox "连接成功"
End Sub
Private Sub Command2_Click()
Winsock1.Close
Command1.Enabled = True
End Sub
Private Sub Command3_Click()
Winsock1.SendData "aaa"
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询