VB程序,求解释一下这句什么意思
PrivateSubCommand1_Click()DimindexAsIntegerDimSAsStringDimrecUserAsStringS=Trim(Text2...
Private Sub Command1_Click()
Dim index As Integer
Dim S As String
Dim recUser As String
S = Trim(Text2.Text)
Text2.Text = ""
recUser = Combo1.Text
If recUser = "所有人" Then
If S = "SystemOrder:boot" Then
For i = 0 To MaxChan - 1
userState(i) = 3
Next
End If
Call SendToAll(S)
Else
index = FindSckIndex(recUser)
If S = "SystemOrder:boot" Then userState(index) = 3
Call SendToOne(S, index)
End If
S = "对" & recUser & "说:" & S
Call AddToText1(S)
End Sub 展开
Dim index As Integer
Dim S As String
Dim recUser As String
S = Trim(Text2.Text)
Text2.Text = ""
recUser = Combo1.Text
If recUser = "所有人" Then
If S = "SystemOrder:boot" Then
For i = 0 To MaxChan - 1
userState(i) = 3
Next
End If
Call SendToAll(S)
Else
index = FindSckIndex(recUser)
If S = "SystemOrder:boot" Then userState(index) = 3
Call SendToOne(S, index)
End If
S = "对" & recUser & "说:" & S
Call AddToText1(S)
End Sub 展开
1个回答
展开全部
这个不是完整的代码,里面有好几个函数都没有定义,貌似一个通信程序,有没有完整的……看看就可以知道了
更多追问追答
追问
Dim Hig As Long
Dim con As Integer
Dim userIP() As String
Dim user() As String '在线名单
Dim userState() As Integer '-1 请求退出 0 离线 1 正常在线 2 只能看不能发言 3 正在被踢 4 客户端非正常终止
Dim zxrs As Integer '在线人数
追答
Private Sub Command1_Click()
Dim index As Integer
Dim S As String
Dim recUser As String
S = Trim(Text2.Text)
Text2.Text = ""
recUser = Combo1.Text
If recUser = "所有人" Then
If S = "SystemOrder:boot" Then
For i = 0 To MaxChan - 1
userState(i) = 3
Next
End If
Call SendToAll(S)'这里调用函数发送给所有用户
Else
index = FindSckIndex(recUser)
If S = "SystemOrder:boot" Then userState(index) = 3'踢掉用户
Call SendToOne(S, index)
End If
S = "对" & recUser & "说:" & S
Call AddToText1(S)'私聊
End Sub
你还有哪里不清楚
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询