📄 active.frm
字号:
VERSION 5.00
Begin VB.Form active
Caption = "在线名单"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
Icon = "active.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.ListBox List1
Height = 2040
Left = 0
MultiSelect = 1 'Simple
TabIndex = 0
Top = 0
Width = 4695
End
Begin VB.Timer Timer1
Interval = 5000
Left = 840
Top = 2640
End
Begin VB.Menu popmenu
Caption = "popmenu"
Visible = 0 'False
Begin VB.Menu popmenukick
Caption = "踢 出"
End
Begin VB.Menu popmenuclose
Caption = "结 束"
End
Begin VB.Menu popmenumsg
Caption = "消 息"
End
Begin VB.Menu popmenubc
Caption = "广 播"
End
Begin VB.Menu popmenuclosemic
Caption = "断 麦"
End
End
End
Attribute VB_Name = "active"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Call userlist
End Sub
Private Sub userlist()
List1.Clear
For i = 0 To main.sckServer.Count - 1
If main.sckServer(i).State = 7 Then
List1.AddItem "用户名:" + User_info(i).Name + Chr(10) + "IP:" + User_info(i).RemoteIp + ":" + User_info(i).RemotePort + Chr(10) + "所在房间:" + User_info(i).RoomID + Chr(10) + "SOCKET:RX-0000" + CStr(i)
End If
Next i
End Sub
Private Sub Form_Resize()
On Error Resume Next
List1.Width = Me.Width - 100
List1.Height = Me.Height - 400
End Sub
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu popmenu
End Sub
Private Sub popmenubc_Click()
Dim str As String
str = InputBox("请输入广播内容:", "广播")
Call BoardCast(str)
End Sub
Private Sub popmenuclose_Click()
If MsgBox("确实强制端开此连接吗?", vbOKCancel, "提示") = vbOK Then
UserLogout (CInt(Right(List1.Text, 4)))
End If
End Sub
Private Sub popmenuclosemic_Click()
Call CloseMic(CInt(Right(List1.Text, 4)))
End Sub
Private Sub popmenukick_Click()
Dim str As String
If MsgBox("确实提出该用户吗?", vbOKCancel, "提示") = vbOK Then
str = InputBox("请输入踢人理由:", "提示")
Call Kick(str, CInt(Right(List1.Text, 4)))
End If
End Sub
Private Sub popmenumsg_Click()
Dim str As String
str = InputBox("请输入广播内容:", "广播")
Call SendMessage(str, CInt(Right(List1.Text, 4)))
End Sub
Private Sub Timer1_Timer()
Call userlist
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -