📄 frm_setsys.frm
字号:
VERSION 5.00
Object = "{2B12169D-6738-11D2-BF5B-00A024982E5B}#31.8#0"; "CoolButton.OCX"
Begin VB.Form frm_setsys
BorderStyle = 1 'Fixed Single
Caption = "GPRS用电管理系统"
ClientHeight = 4500
ClientLeft = 45
ClientTop = 330
ClientWidth = 9390
Icon = "frm_setsys.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4500
ScaleWidth = 9390
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "系统设置"
ForeColor = &H00FF0000&
Height = 4455
Left = 0
TabIndex = 0
Top = 0
Width = 9375
Begin VB.Frame Frame5
Caption = "设置系统数据库"
Height = 1455
Left = 120
TabIndex = 16
Top = 360
Width = 4335
Begin VB.TextBox txt_dbservername
Height = 375
Left = 1560
TabIndex = 18
Text = "127.0.0.1"
Top = 240
Width = 2175
End
Begin VB.TextBox txt_dbname
Height = 375
Left = 1560
TabIndex = 17
Text = "gprspc"
Top = 840
Width = 2175
End
Begin VB.Label Label1
Caption = "数据库服务器名:"
Height = 255
Left = 120
TabIndex = 20
Top = 360
Width = 1575
End
Begin VB.Label Label2
Caption = "数据库名称:"
Height = 255
Left = 120
TabIndex = 19
Top = 960
Width = 1095
End
End
Begin VB.Frame Frame2
Caption = "设置数据中心"
Height = 1455
Left = 4800
TabIndex = 11
Top = 360
Width = 4335
Begin VB.TextBox txt_centerip
Height = 375
Left = 1680
TabIndex = 13
Text = "58.49.106.170"
Top = 240
Width = 2175
End
Begin VB.TextBox txt_centerport
Height = 375
Left = 1680
TabIndex = 12
Text = "3000"
Top = 840
Width = 2175
End
Begin VB.Label Label3
Caption = "数据中心IP:"
Height = 255
Left = 240
TabIndex = 15
Top = 360
Width = 1575
End
Begin VB.Label Label4
Caption = "数据中心端口:"
Height = 255
Left = 240
TabIndex = 14
Top = 960
Width = 1455
End
End
Begin VB.Frame Frame3
Caption = "设置串口"
Height = 1335
Left = 120
TabIndex = 6
Top = 2280
Width = 4335
Begin VB.OptionButton Option4
Appearance = 0 'Flat
Caption = "串口4"
ForeColor = &H80000008&
Height = 375
Left = 2520
TabIndex = 10
Top = 840
Width = 1200
End
Begin VB.OptionButton Option3
Appearance = 0 'Flat
Caption = "串口3"
ForeColor = &H80000008&
Height = 375
Left = 240
TabIndex = 9
Top = 840
Width = 855
End
Begin VB.OptionButton Option2
Appearance = 0 'Flat
Caption = "串口2"
ForeColor = &H80000008&
Height = 495
Left = 2520
TabIndex = 8
Top = 120
Width = 1200
End
Begin VB.OptionButton Option1
Appearance = 0 'Flat
Caption = "串口1"
ForeColor = &H80000008&
Height = 375
Left = 240
TabIndex = 7
Top = 240
Value = -1 'True
Width = 1215
End
End
Begin VB.Frame Frame4
Caption = "设置主机"
Height = 1335
Left = 4800
TabIndex = 1
Top = 2280
Width = 4335
Begin VB.TextBox txt_pcsim
Height = 375
Left = 1680
TabIndex = 3
Text = "0"
Top = 240
Width = 2175
End
Begin VB.TextBox txt_pcpw
Height = 375
Left = 1680
TabIndex = 2
Text = "0"
Top = 840
Width = 2175
End
Begin VB.Label Label5
Caption = "主机SIM卡号"
Height = 255
Left = 240
TabIndex = 5
Top = 360
Width = 1575
End
Begin VB.Label Label6
Caption = "主机密码:"
Height = 255
Left = 240
TabIndex = 4
Top = 960
Width = 1095
End
End
Begin TButton.axButton axButton2
Height = 330
Left = 4440
TabIndex = 21
Top = 3960
Width = 1095
_ExtentX = 1931
_ExtentY = 582
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "退 出"
MaskColor = -2147483633
End
Begin TButton.axButton axButton1
Height = 330
Left = 3120
TabIndex = 22
Top = 3960
Width = 1095
_ExtentX = 1931
_ExtentY = 582
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "确 定"
MaskColor = -2147483633
End
End
End
Attribute VB_Name = "frm_setsys"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub axButton1_Click()
If Trim(txt_dbservername.Text) = "" Then
MsgBox ("数据库服务器名不能为空!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Trim(txt_dbname.Text) = "" Then
MsgBox ("数据库名不能为空!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Trim(txt_centerip.Text) = "" Then
MsgBox ("数据中心IP不能为空!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Trim(txt_centerport.Text) = "" Then
MsgBox ("数据中心IP端口不能为空!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If txt_pcsim.Text = "" Then
MsgBox ("主机SIM卡号不能为空"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If txt_pcpw.Text = "" Then
MsgBox ("主机密码不能为空"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Option1.Value = True Then
SetInIKeyValue "com", "comport", "1", App.Path & "\file\gprspcset.ini"
End If
If Option2.Value = True Then
SetInIKeyValue "com", "comport", "2", App.Path & "\file\gprspcset.ini"
End If
If Option3.Value = True Then
SetInIKeyValue "com", "comport", "3", App.Path & "\file\gprspcset.ini"
End If
If Option4.Value = True Then
SetInIKeyValue "com", "comport", "4", App.Path & "\file\gprspcset.ini"
End If
SetInIKeyValue "database", "databasesername", Trim(txt_dbservername.Text), App.Path & "\file\gprspcset.ini"
SetInIKeyValue "database", "databasename", Trim(txt_dbname.Text), App.Path & "\file\gprspcset.ini"
SetInIKeyValue "center", "centerip", Trim(txt_centerip.Text), App.Path & "\file\gprspcset.ini"
SetInIKeyValue "center", "centerport", Trim(txt_centerport.Text), App.Path & "\file\gprspcset.ini"
SetInIKeyValue "pcset", "pcsim", Trim(txt_pcsim.Text), App.Path & "\file\gprspcset.ini"
SetInIKeyValue "pcset", "pcpw", Trim(txt_pcpw.Text), App.Path & "\file\gprspcset.ini"
MsgBox ("系统设置已经完成!"), vbOKOnly + vbInformation, "提示"
End Sub
Private Sub axButton2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -