主题:vb单步调试与连续(运行)
为什么 我的程序在单步调试时会出现错误! 而运行则不会!!
服务器端:
Winsock1(0).LocalPort = 1
Winsock1(0).Listen
Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Winsock1(0).Close
Winsock1(0).Accept requestID
End Sub
客户端:
Winsock1(1).RemoteHost = "服务器IP"
Winsock1(1).RemotePort = 1
Winsock1(1).Connect
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Winsock1(1).GetData Data, vbString
Text1.Text = Data
End Sub
服务器端:
Winsock1(0).LocalPort = 1
Winsock1(0).Listen
Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Winsock1(0).Close
Winsock1(0).Accept requestID
End Sub
客户端:
Winsock1(1).RemoteHost = "服务器IP"
Winsock1(1).RemotePort = 1
Winsock1(1).Connect
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Winsock1(1).GetData Data, vbString
Text1.Text = Data
End Sub