Private Sub Command1_Click()
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 13:00:40
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
这个不是完整的代码,里面有好几个函数都没有定义,貌似一个通信程序,有没有完整的……看看就可以知道了
再问: 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 你还有哪里不清楚
再问: S = "SystemOrder:boot" 是判断什么呢? userState(i) = 3 ’为什么等于三呢? FindSckIndex()这个函数是做什么的? 嘿嘿 虽然很多 但是诚心想知道 谢谢呀~
再答: 其实你第二次发的代码加上去也不全,S= "SystemOrder:boot"判断系统命令的状态,这个是作者自己定义的, Dim userState() As Integer '-1 请求退出 0 离线 1 正常在线 2 只能看不能发言 3 正在被踢 4 客户端非正常终止……我们就知道userState(i) 可以等于-1,0,1,2,,3,,4而且意义是对应的 FindSckIndex()这个是判断用户的 希望能帮到你
再问: 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 你还有哪里不清楚
再问: S = "SystemOrder:boot" 是判断什么呢? userState(i) = 3 ’为什么等于三呢? FindSckIndex()这个函数是做什么的? 嘿嘿 虽然很多 但是诚心想知道 谢谢呀~
再答: 其实你第二次发的代码加上去也不全,S= "SystemOrder:boot"判断系统命令的状态,这个是作者自己定义的, Dim userState() As Integer '-1 请求退出 0 离线 1 正常在线 2 只能看不能发言 3 正在被踢 4 客户端非正常终止……我们就知道userState(i) 可以等于-1,0,1,2,,3,,4而且意义是对应的 FindSckIndex()这个是判断用户的 希望能帮到你
Private Sub Command1_Click()
vb Private Sub Command1_Click()
private sub command1_click()
VB问题Private Sub Command1_Click()
Private Sub Form_Click()和Private Sub Command1_Click()有什么区别?
VB里的“Private Sub Command1_Click()”是什么意思?
Private Sub Command1_Click() Dim i,j As Integer For i = 3 To
VB的if语句的问题Private Sub Command1_Click()If Text1 = "111" ThenF
Private Sub Command1_Click() Dim i As Double,M As Double,L A
请教下面VB 代码的意思 Private Sub Command1_Click() If Combo1.Text ""
几道VB程序题,Private Sub Command1_Click()Dim x As Integerx = Val(
帮忙VB试题我怎么想都算不对Private Sub Command1_Click()Dim a As Integer,b