📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "聊天室服务器"
ClientHeight = 1800
ClientLeft = 4260
ClientTop = 2550
ClientWidth = 3390
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1800
ScaleWidth = 3390
Begin VB.Frame Frame1
Height = 1695
Left = 120
TabIndex = 0
Top = 0
Width = 3135
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 = 2160
TabIndex = 2
Text = "20"
Top = 360
Width = 735
End
Begin VB.CommandButton Command1
Caption = "启动服务器"
Height = 375
Left = 960
TabIndex = 1
Top = 1020
Width = 1215
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 = 360
TabIndex = 3
Top = 420
Width = 1815
End
End
End
Attribute VB_Name = "Form1"
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()
MaxChan = Val(Text1.Text)
If MaxChan < 1 Or MaxChan > 100 Then
Text1.Text = ""
Text1.SetFocus
Else
frmServer.Show
Unload Me
End If
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -