VB 编写的TCP/Socket客户端运行到winsck.Connect()执行不下去,无法与服务器进行连接。
VB 编写的TCP/Socket客户端运行到winsck.Connect()执行不下去,无法与服务器进行连接。部分代码和截图如下:
客户端:
Private Sub cmd_ok_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd_ok.Click
winsck.Close()
winsck.Connect(txt_ip, txt_port) '执行到这个语句就报错了
lbl_msg.Text = "Version: 1.0 : " & VB6.Format(Now, "mmm dd yyyy Hh:Nn:Ss")
cmd_ok.Enabled = False
chk_edit.Enabled = False
txt_ip.Enabled = False
txt_port.Enabled = False
End Sub
[解决办法]
报什么错?……