📄 frmset.frm
字号:
VERSION 5.00
Begin VB.Form frmSet
Caption = "Form1"
ClientHeight = 3432
ClientLeft = 48
ClientTop = 336
ClientWidth = 5352
LinkTopic = "Form1"
ScaleHeight = 3432
ScaleWidth = 5352
StartUpPosition = 2 'CenterScreen
Begin VB.Frame Frame1
Caption = "设置选项"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3312
Left = 60
TabIndex = 0
Top = 60
Width = 5232
Begin VB.CheckBox chkDir
Caption = "允许浏览目录"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 2520
TabIndex = 8
Top = 1320
Width = 1872
End
Begin VB.CommandButton CmdSetDir
Caption = "..."
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 3960
TabIndex = 7
Top = 240
Width = 468
End
Begin VB.TextBox txtPort
Appearance = 0 'Flat
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 1020
TabIndex = 6
Top = 1260
Width = 792
End
Begin VB.CheckBox chkPass
Caption = "需要认证"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 2520
TabIndex = 5
Top = 1680
Width = 1212
End
Begin VB.TextBox txtUser
Appearance = 0 'Flat
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 4
Top = 2088
Width = 1092
End
Begin VB.TextBox txtPsw
Appearance = 0 'Flat
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 3120
TabIndex = 3
Top = 2460
Width = 1092
End
Begin VB.CommandButton cmdOk
Caption = "确定"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 540
TabIndex = 2
Top = 2880
Width = 1332
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 2640
TabIndex = 1
Top = 2880
Width = 1452
End
Begin VB.Label Label5
Caption = "注:端口改变之后要重新启动服务器才生效"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 552
Left = 240
TabIndex = 14
Top = 1680
Width = 1572
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "密码"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 264
Left = 2580
TabIndex = 13
Top = 2460
Width = 432
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "帐号"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 204
Left = 2556
TabIndex = 12
Top = 2100
Width = 432
End
Begin VB.Line Line1
X1 = 60
X2 = 5220
Y1 = 1020
Y2 = 1020
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "根目录"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 204
Left = 120
TabIndex = 11
Top = 300
Width = 648
End
Begin VB.Label Label1
Caption = "端口号"
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 240
TabIndex = 10
Top = 1260
Width = 792
End
Begin VB.Label lblRoot
BeginProperty Font
Name = "幼圆"
Size = 10.2
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 312
Left = 120
TabIndex = 9
Top = 600
Width = 5052
End
End
End
Attribute VB_Name = "frmSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'该窗体用于设置服务器选项
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
If chkDir.Value = 1 Then
bDir = True
Else
bDir = False
End If
If chkPass.Value = 1 Then
NeedPass = True
Else
NeedPass = False
End If
ServerPort = Val(txtPort.Text)
Dim Str1 As String
Str1 = txtUser.Text & ":" & txtPsw.Text
PassStr = EncodeStr(Str1)
UserName = txtUser.Text
UserPass = txtPsw.Text
Unload Me
End Sub
Private Sub CmdSetDir_Click()
frmSetDir.Show vbModal
End Sub
Private Sub Form_Load()
lblRoot.Caption = RootPath
If bDir = True Then
chkDir.Value = 1
End If
If NeedPass = True Then
chkPass.Value = 1
End If
txtPort.Text = ServerPort
txtUser.Text = UserName
txtPsw.Text = UserPass
End Sub
Private Sub txtPort_LostFocus()
If IsNumeric(txtPort) = False Then
MsgBox "你填写的服务器端口须为整数!!"
txtPort.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -