请高手看看我做的一个VB局域网聊天,为什么客户端一直显示已与服务器断开连接
代码如下这个是服务器的PrivateGac()AsBooleanDimSocknumberAsIntegerPrivateSubForm1_Load()Winsock1(...
代码如下这个是服务器的
Private Gac() As Boolean
Dim Socknumber As Integer
Private Sub Form1_Load()
Winsock1(0).LocalPort = 1600
Winsock1(0).Listen
Socknumber = 0
End Sub
Private Sub Timer1_Timer()
Dim R As Byte, G As Byte, B As Byte
Randomize
R = Int(Rnd * 255) + 1
G = Int(Rnd * 255) + 1
B = Int(Rnd * 255) + 1
Label1.ForeColor = RGB(R, G, B)
Label2.ForeColor = RGB(R, G, B)
End Sub 展开
Private Gac() As Boolean
Dim Socknumber As Integer
Private Sub Form1_Load()
Winsock1(0).LocalPort = 1600
Winsock1(0).Listen
Socknumber = 0
End Sub
Private Sub Timer1_Timer()
Dim R As Byte, G As Byte, B As Byte
Randomize
R = Int(Rnd * 255) + 1
G = Int(Rnd * 255) + 1
B = Int(Rnd * 255) + 1
Label1.ForeColor = RGB(R, G, B)
Label2.ForeColor = RGB(R, G, B)
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询