📄 frm_setcom.frm
字号:
VERSION 5.00
Object = "{2B12169D-6738-11D2-BF5B-00A024982E5B}#31.8#0"; "CoolButton.OCX"
Begin VB.Form frm_setcom
BorderStyle = 1 'Fixed Single
Caption = "GPRS用电管理系统"
ClientHeight = 2265
ClientLeft = 45
ClientTop = 435
ClientWidth = 4065
ForeColor = &H00FF0000&
Icon = "frm_setcom.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2265
ScaleWidth = 4065
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "串口设置"
ForeColor = &H00FF0000&
Height = 2250
Left = 0
TabIndex = 0
Top = 0
Width = 4050
Begin TButton.axButton xpcmdbutton2
Height = 330
Left = 2880
TabIndex = 7
Top = 1850
Width = 975
_ExtentX = 1720
_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 xpcmdbutton1
Height = 330
Left = 1320
TabIndex = 6
Top = 1850
Width = 975
_ExtentX = 1720
_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 VB.Frame Frame2
Caption = "请选择串口"
Height = 1575
Left = 120
TabIndex = 1
Top = 240
Width = 3855
Begin VB.OptionButton Option4
Appearance = 0 'Flat
Caption = "串口4"
ForeColor = &H80000008&
Height = 375
Left = 2520
TabIndex = 5
Top = 960
Width = 1200
End
Begin VB.OptionButton Option3
Appearance = 0 'Flat
Caption = "串口3"
ForeColor = &H80000008&
Height = 375
Left = 720
TabIndex = 4
Top = 960
Width = 855
End
Begin VB.OptionButton Option2
Appearance = 0 'Flat
Caption = "串口2"
ForeColor = &H80000008&
Height = 495
Left = 2520
TabIndex = 3
Top = 360
Width = 1200
End
Begin VB.OptionButton Option1
Appearance = 0 'Flat
Caption = "串口1"
ForeColor = &H80000008&
Height = 375
Left = 720
TabIndex = 2
Top = 360
Width = 1215
End
End
End
End
Attribute VB_Name = "frm_setcom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Option1.Value = True
End Sub
Private Sub xpcmdbutton1_Click() '串口设置
If Err Then GoTo errhandle
If Option1.Value = True Then
SetInIKeyValue "com", "comport", "1", App.Path & "\file\gprspcset.ini"
MsgBox ("串口设置成功!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Option2.Value = True Then
SetInIKeyValue "com", "comport", "2", App.Path & "\file\gprspcset.ini"
MsgBox ("串口设置成功!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Option3.Value = True Then
SetInIKeyValue "com", "comport", "3", App.Path & "\file\gprspcset.ini"
MsgBox ("串口设置成功!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Option4.Value = True Then
SetInIKeyValue "com", "comport", "4", App.Path & "\file\gprspcset.ini"
MsgBox ("串口设置成功!"), vbOKOnly + vbInformation, "提示"
Exit Sub
End If
' MsgBox ("串口设置成功!"), vbOKOnly + vbInformation, "提示"
errhandle:
MsgBox (App.Path & "\file\gprspcset.ini" & "文件是否已经破坏!"), vbOKOnly + vbCritical, "操作失败"
End Sub
Private Sub xpcmdbutton2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -