📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form FrmSet
Caption = "Form1"
ClientHeight = 1935
ClientLeft = 60
ClientTop = 450
ClientWidth = 3345
LinkTopic = "Form1"
ScaleHeight = 1935
ScaleWidth = 3345
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 1935
Index = 0
Left = 0
TabIndex = 0
Top = 0
Width = 3375
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 1800
TabIndex = 6
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 480
TabIndex = 5
Top = 1320
Width = 1095
End
Begin VB.ComboBox Comb
Height = 300
Index = 0
ItemData = "Form1.frx":0000
Left = 1200
List = "Form1.frx":0031
TabIndex = 2
Text = "9600"
Top = 360
Width = 1935
End
Begin VB.ComboBox Comb
Height = 300
Index = 1
ItemData = "Form1.frx":0097
Left = 1200
List = "Form1.frx":0099
TabIndex = 1
Top = 720
Width = 1935
End
Begin VB.Label lb
Caption = "通信速度"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 240
TabIndex = 4
Top = 360
Width = 975
End
Begin VB.Label lb
Caption = "通信端口"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 240
TabIndex = 3
Top = 840
Width = 855
End
End
End
Attribute VB_Name = "FrmSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim I As Byte
Dim STR As String
SysInfomation.MsComString = Me.Comb(0).Text + ",n,8,1"
STR = Comb(1).Text
STR = Mid(STR, 4, Len(STR) - 3)
SysInfomation.MsComNo = CByte(STR)
SaveSysInfomation '保存通信设置
Unload FrmSet
End Sub
Private Sub Command2_Click()
Unload FrmSet
End Sub
Private Sub Form_Load()
Dim STR As String, I As Byte
For I = 1 To 16
STR = "COM" + CStr(I)
Me.Comb(1).AddItem STR
Next I
Comb(1).Text = "COM" + CStr(SysInfomation.MsComNo)
I = InStr(1, SysInfomation.MsComString, ",") - 1
STR = Mid(SysInfomation.MsComString, 1, I)
Comb(0).Text = STR
End Sub
Private Sub Form_Unload(Cancel As Integer)
Frmmain.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -