📄 frmfriends.frm
字号:
VERSION 5.00
Begin VB.Form frmFriends
BorderStyle = 1 'Fixed Single
Caption = "Amojeba Chat"
ClientHeight = 2985
ClientLeft = 150
ClientTop = 435
ClientWidth = 2130
Icon = "frmFriends.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2985
ScaleWidth = 2130
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "Online Users:"
Height = 2940
Left = 15
TabIndex = 0
Top = 0
Width = 2085
Begin VB.ListBox lstUsers
Height = 2595
Left = 90
TabIndex = 1
ToolTipText = "Double Click to chat with a person"
Top = 240
Width = 1905
End
End
Begin VB.Menu mnuFile
Caption = "&File"
Index = 0
Visible = 0 'False
Begin VB.Menu mnuExit
Caption = "&Exit"
Index = 1
End
End
End
Attribute VB_Name = "frmFriends"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Unload(Cancel As Integer)
SignOff = 1 ' A variable telling the program its time to close
If frmLogin.sockUser.State <> 0 Then ' If online do (below)
frmLogin.sockUser.SendData "SignOff:" & frmLogin.txtName.Text ' Tell the server we are closing our connection
End If
Unload Me ' Unload this form
frmLogin.Show ' Show the login form again
End Sub
Private Sub lstUsers_DblClick()
Dim frm As Form, FoundItm As Integer
FoundItm = 0 ' A var to see if it finds the form
For Each frm In Forms ' Loop all open forms
If LCase(frm.Tag) = LCase(lstUsers.Text) Then ' If the person they want to chat with has a window open
FoundItm = 1 ' Forget it
End If
Next frm
If FoundItm = 0 Then ' They arnt chatting with the person already
Dim myForm As New Chat ' So load up a new window
Load myForm ' -^
myForm.Tag = lstUsers.Text '
myForm.cboUsers.Text = lstUsers.Text '
myForm.Caption = "Amojeba Message to: " & lstUsers.Text '
myForm.Visible = True ' Make it visible
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -