VB编译错误:错误的参数号或者无效的属性赋值 5
是一个聊天程序Constmaxn=200Dimuser(maxn)AsBooleanPrivateSubCommand1_Click()Form2.HideEndSubP...
是一个聊天程序
Const maxn = 200
Dim user(maxn) As Boolean
Private Sub Command1_Click()
Form2.Hide
End Sub
Private Sub Command2_Click()
Load Form1
Form1.Show
End Sub
Private Sub Form_Load()
Dim str1 As String
Form2.Caption = "飞飞通信软件"
a.LocalPort = 3000
a.Listen
End Sub
Private Sub a_ConnectionRequest(ByVal requestID As Long)
Dim i As Long
For i = 1 To maxn
If Not user(i) Then
user(i) = True
Exit For
End If
Next i
If i > maxn Then
Exit Sub
End If
Load b(i)
b(i).Accept requestID
If Text1.Text = "" Then
b(i).SendData Chr(0)
Else
b(i).SendData Text1.Text
End If
Form2.Show
End Sub
Private Sub s_Close(Index As Integer)
b(Index).Close
Unload b(Index)
user(Index) = False
End Sub
Private Sub b_DataArrival2(Index As Integer, ByVal bytesTotal As Long)
Dim str As String
Dim i As Long
b(Index).GetData str
Text1.Text = Text1.Text + str
For i = 1 To maxn
If user(i) Then
b(i).SendData str
End If
Next i
End Sub
望牛人帮我解决! 展开
Const maxn = 200
Dim user(maxn) As Boolean
Private Sub Command1_Click()
Form2.Hide
End Sub
Private Sub Command2_Click()
Load Form1
Form1.Show
End Sub
Private Sub Form_Load()
Dim str1 As String
Form2.Caption = "飞飞通信软件"
a.LocalPort = 3000
a.Listen
End Sub
Private Sub a_ConnectionRequest(ByVal requestID As Long)
Dim i As Long
For i = 1 To maxn
If Not user(i) Then
user(i) = True
Exit For
End If
Next i
If i > maxn Then
Exit Sub
End If
Load b(i)
b(i).Accept requestID
If Text1.Text = "" Then
b(i).SendData Chr(0)
Else
b(i).SendData Text1.Text
End If
Form2.Show
End Sub
Private Sub s_Close(Index As Integer)
b(Index).Close
Unload b(Index)
user(Index) = False
End Sub
Private Sub b_DataArrival2(Index As Integer, ByVal bytesTotal As Long)
Dim str As String
Dim i As Long
b(Index).GetData str
Text1.Text = Text1.Text + str
For i = 1 To maxn
If user(i) Then
b(i).SendData str
End If
Next i
End Sub
望牛人帮我解决! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询