📄 form1.frm
字号:
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "编码字节数:"
Height = 180
Left = 120
TabIndex = 15
Top = 720
Width = 996
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "串行口:"
Height = 180
Left = 120
TabIndex = 12
Top = 360
Width = 636
End
End
Begin VB.Frame Frame2
Caption = "设备2"
Height = 1092
Left = 1920
TabIndex = 3
Top = 240
Width = 1932
Begin VB.ComboBox Combo10
Height = 276
Left = 1200
TabIndex = 7
Text = "10"
Top = 720
Width = 612
End
Begin VB.ComboBox Combo2
Height = 276
Left = 1200
TabIndex = 6
Text = "2"
Top = 360
Width = 612
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "编码字节数:"
Height = 180
Left = 120
TabIndex = 16
Top = 720
Width = 996
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "串行口:"
Height = 180
Left = 120
TabIndex = 13
Top = 360
Width = 636
End
End
Begin VB.Frame Frame1
Caption = "设备1"
Height = 1092
Left = 0
TabIndex = 2
Top = 240
Width = 1932
Begin VB.ComboBox Combo9
Height = 276
Left = 1200
TabIndex = 5
Text = "9"
Top = 720
Width = 612
End
Begin VB.ComboBox Combo1
Height = 276
Left = 1200
TabIndex = 4
Text = "1"
Top = 360
Width = 612
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "编码字节数:"
Height = 180
Index = 0
Left = 120
TabIndex = 14
Top = 720
Width = 996
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "串行口:"
Height = 180
Index = 0
Left = 120
TabIndex = 11
Top = 360
Width = 636
End
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 372
Left = 3960
TabIndex = 1
Top = 2880
Width = 972
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 372
Left = 2400
TabIndex = 0
Top = 2880
Width = 972
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
c_port(1) = CInt(Combo1.Text)
c_port(2) = CInt(Combo2.Text)
c_port(3) = CInt(Combo3.Text)
c_port(4) = CInt(Combo4.Text)
c_port(5) = CInt(Combo5.Text)
c_port(6) = CInt(Combo6.Text)
c_port(7) = CInt(Combo7.Text)
c_port(8) = CInt(Combo8.Text)
c_zijie(1) = CInt(Combo9.Text)
c_zijie(2) = CInt(Combo10.Text)
c_zijie(3) = CInt(Combo11.Text)
c_zijie(4) = CInt(Combo12.Text)
c_zijie(5) = CInt(Combo13.Text)
c_zijie(6) = CInt(Combo14.Text)
c_zijie(7) = CInt(Combo15.Text)
c_zijie(8) = CInt(Combo16.Text)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port1", setting:=c_port(1)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port2", setting:=c_port(2)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port3", setting:=c_port(3)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port4", setting:=c_port(4)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port5", setting:=c_port(5)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port6", setting:=c_port(6)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port7", setting:=c_port(7)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="port8", setting:=c_port(8)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie1", setting:=c_zijie(1)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie2", setting:=c_zijie(2)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie3", setting:=c_zijie(3)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie4", setting:=c_zijie(4)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie5", setting:=c_zijie(5)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie6", setting:=c_zijie(6)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie7", setting:=c_zijie(7)
SaveSetting appname:=App.title, section:="SECURITY", _
Key:="zijie8", setting:=c_zijie(8)
Me.Hide
Call Max.init
End Sub
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 8
Combo1.AddItem i
Combo2.AddItem i
Combo3.AddItem i
Combo4.AddItem i
Combo5.AddItem i
Combo6.AddItem i
Combo7.AddItem i
Combo8.AddItem i
Next i
Combo9.AddItem 4
Combo9.AddItem 8
Combo9.AddItem 16
Combo10.AddItem 4
Combo10.AddItem 8
Combo10.AddItem 16
Combo11.AddItem 4
Combo11.AddItem 8
Combo11.AddItem 16
Combo12.AddItem 4
Combo12.AddItem 8
Combo12.AddItem 16
Combo13.AddItem 4
Combo13.AddItem 8
Combo13.AddItem 16
Combo14.AddItem 4
Combo14.AddItem 8
Combo14.AddItem 16
Combo15.AddItem 4
Combo15.AddItem 8
Combo16.AddItem 16
Combo16.AddItem 4
Combo16.AddItem 8
Combo16.AddItem 16
Combo1.Text = c_port(1)
Combo2.Text = c_port(2)
Combo3.Text = c_port(3)
Combo4.Text = c_port(4)
Combo5.Text = c_port(5)
Combo6.Text = c_port(6)
Combo7.Text = c_port(7)
Combo8.Text = c_port(8)
Combo9.Text = c_zijie(1)
Combo10.Text = c_zijie(2)
Combo11.Text = c_zijie(3)
Combo12.Text = c_zijie(4)
Combo13.Text = c_zijie(5)
Combo14.Text = c_zijie(6)
Combo15.Text = c_zijie(7)
Combo16.Text = c_zijie(8)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -