📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 1 'Fixed Single
Caption = "登录聊天室"
ClientHeight = 2430
ClientLeft = 3435
ClientTop = 2895
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2430
ScaleWidth = 4680
Begin VB.CommandButton SetIP
Caption = "设置服务器IP"
Height = 375
Left = 3000
TabIndex = 3
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "进入聊天室"
Height = 375
Left = 600
TabIndex = 2
Top = 1680
Width = 2055
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2040
TabIndex = 0
Top = 660
Width = 1455
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 2175
Left = 120
Top = 120
Width = 4455
End
Begin VB.Label Label1
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 1
Top = 720
Width = 735
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim fso As New FileSystemObject
Dim fil As File
Private Sub Command1_Click()
ServerIP = ReadServerIP("Setup.ini")
userName = Trim(Text1.Text)
If userName = "" Then
MsgBox "姓名不能为空!"
Text1.SetFocus
Exit Sub
End If
Load frmClient
Command1.Enabled = False
End Sub
Private Sub Form_Load()
Dim filepath As String
sysfilepath = fso.GetSpecialFolder(1)
If fso.FileExists(sysfilepath & "\Mswinsck.ocx") = True Then
Exit Sub
Else
MsgBox ("Mswinsck.ocx不存在!准备安装.....")
If fso.FileExists("Mswinsck.ocx") = True Then
Set fil = fso.GetFile("Mswinsck.ocx")
fil.Copy (sysfilepath & "\")
MsgBox ("Mswinsck.ock安装成功!")
Else
MsgBox ("当前文件夹找不到Mswinsck.ocx,安装失败!")
End If
End If
End Sub
Private Sub SetIP_Click()
frmSetIP.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -