📄 frmsetup.frm
字号:
VERSION 5.00
Begin VB.Form frmSetup
BorderStyle = 1 'Fixed Single
Caption = "系统设置"
ClientHeight = 4980
ClientLeft = 45
ClientTop = 330
ClientWidth = 4845
Icon = "frmSetup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4980
ScaleWidth = 4845
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text4
Height = 1095
Left = 1440
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 12
Top = 3000
Width = 3255
End
Begin VB.TextBox Text3
Height = 270
Left = 3240
TabIndex = 9
Top = 2520
Width = 1335
End
Begin VB.TextBox Text2
Height = 270
Left = 1800
TabIndex = 8
Text = "192.168.0.1"
Top = 1080
Width = 2655
End
Begin VB.TextBox Text1
Height = 270
Left = 1800
TabIndex = 7
Text = "1"
Top = 480
Width = 2655
End
Begin VB.CheckBox Check2
Caption = "禁止删除文件"
Height = 375
Left = 600
TabIndex = 6
Top = 2040
Width = 3255
End
Begin VB.CheckBox Check1
Caption = "启动时启动网吧记费器客户版"
Height = 375
Left = 600
TabIndex = 5
Top = 1560
Width = 3135
End
Begin VB.CommandButton Command3
Caption = "应用"
Enabled = 0 'False
Height = 375
Left = 3600
TabIndex = 2
Top = 4320
Width = 975
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2400
TabIndex = 1
Top = 4320
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1200
TabIndex = 0
Top = 4320
Width = 975
End
Begin VB.Label Label4
Caption = "提示语言:"
Height = 255
Left = 480
TabIndex = 11
Top = 3000
Width = 1095
End
Begin VB.Label Label3
Caption = "当不能与主机联结时设置的密码:"
Height = 375
Left = 480
TabIndex = 10
Top = 2520
Width = 2895
End
Begin VB.Label Label2
Caption = "主机IP地址:"
Height = 375
Left = 480
TabIndex = 4
Top = 1080
Width = 1095
End
Begin VB.Label Label1
Caption = "本机号:"
Height = 255
Left = 480
TabIndex = 3
Top = 480
Width = 1095
End
End
Attribute VB_Name = "frmSetup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SystemPath As String
Private Sub Check1_Click()
Command3.Enabled = True
End Sub
Private Sub Check2_Click()
Command3.Enabled = True
End Sub
Private Sub Command1_Click()
If Command3.Enabled = True Then Command3_Click
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
'
SaveSetting "网吧记费器", "Set", "SysComputerNum", Text1.Text
SaveSetting "网吧记费器", "Set", "IP", Text2.Text
SaveSetting "网吧记费器", "Set", "NoDelFormatComm", Check2.Value
SaveSetting "网吧记费器", "Set", "password", Text3.Text
SaveSetting "网吧记费器", "Set", "GetWord", Text4.Text
If Check1.Value = 0 Then
RegDeleteKeyName HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "0"
Else
RegSaveStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "0", oString, SystemPath + App.EXEName + ".EXE"
End If
SysComputerNum = Val(Text1.Text)
frmButton.Winsock1.Close
frmButton.Winsock1.RemoteHost = Text2.Text
frmButton.Winsock1.RemotePort = 14914
frmButton.Winsock1.Connect
frmLabel.Label1 = GetSetting("网吧记费器", "Set", "GetWord", "网吧记费器客户版")
frmLabel.Flash
NoDelFormatComm = Check2.Value
End Sub
Private Sub Form_Load()
Text1.Text = GetSetting("网吧记费器", "Set", "SysComputerNum", "0")
Text2.Text = GetSetting("网吧记费器", "Set", "IP", "0")
Text3.Text = GetSetting("网吧记费器", "Set", "password", "")
Text4.Text = GetSetting("网吧记费器", "Set", "GetWord", "网吧记费器客户版")
Check2.Value = Val(GetSetting("网吧记费器", "Set", "NoDelFormatComm", "0"))
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Dim aa As String
RegReadValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "0", 1, aa
SystemPath = App.Path
If Right(SystemPath, 1) <> "\" Then SystemPath = SystemPath + "\"
If aa = SystemPath + App.EXEName + ".EXE" Then Check1.Value = 1 Else Check1.Value = 0
Command3.Enabled = False
End Sub
Private Sub Text1_Change()
Command3.Enabled = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) Like "[!0-9.]" And (Not KeyAscii = 8) Then KeyAscii = 0
End Sub
Private Sub Text2_Change()
Command3.Enabled = True
End Sub
'Private Sub Text2_KeyPress(KeyAscii As Integer)
'If Chr(KeyAscii) Like "[!0-9.]" And (Not KeyAscii = 8) Then KeyAscii = 0
'End Sub
Private Sub Text3_Change()
Command3.Enabled = True
End Sub
Private Sub Text4_Change()
Command3.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -