📄 frmsetting.frm
字号:
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Left = 4560
MaskColor = &H000080FF&
Style = 1 'Graphical
TabIndex = 9
Top = 3870
Width = 1335
End
Begin VB.CommandButton cmdCancel
BackColor = &H00FFC0C0&
Caption = "CANCEL"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Left = 3157
MaskColor = &H000080FF&
Style = 1 'Graphical
TabIndex = 8
Top = 3870
Width = 1335
End
Begin VB.CommandButton cmdOk
BackColor = &H00FFC0C0&
Caption = "OK"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Left = 1755
MaskColor = &H000080FF&
Style = 1 'Graphical
TabIndex = 7
Top = 3870
Width = 1335
End
Begin VB.ComboBox cbComport
Height = 315
ItemData = "frmSetting.frx":057D
Left = 5910
List = "frmSetting.frx":0587
Style = 2 'Dropdown List
TabIndex = 1
Top = 660
Width = 1725
End
Begin VB.Frame Frame1
BackColor = &H00C0C000&
Caption = "INVERTER"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 1090
Left = 3870
TabIndex = 10
Top = 2595
Width = 3740
Begin VB.ComboBox cbParityInver
Height = 315
ItemData = "frmSetting.frx":0597
Left = 1665
List = "frmSetting.frx":05AA
OLEDragMode = 1 'Automatic
OLEDropMode = 1 'Manual
Style = 2 'Dropdown List
TabIndex = 11
Top = 555
Width = 1725
End
Begin VB.Label Label16
BackColor = &H00C0C000&
BackStyle = 0 'Transparent
Caption = "Parity"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 375
Left = 240
TabIndex = 12
Top = 495
Width = 855
End
End
Begin VB.Label Label6
BorderStyle = 1 'Fixed Single
Caption = "Label6"
Height = 1130
Left = 3805
TabIndex = 6
Top = 2570
Width = 45
End
Begin VB.Label Label5
BackColor = &H00C0E0FF&
BorderStyle = 1 'Fixed Single
Caption = "Label2"
Height = 20
Left = 0
TabIndex = 5
Top = 3700
Width = 7710
End
Begin VB.Label Label4
BackColor = &H80000000&
BorderStyle = 1 'Fixed Single
Caption = "Label2"
Height = 15
Left = 0
TabIndex = 4
Top = 2550
Width = 7590
End
Begin VB.Label Label2
BackColor = &H00C0E0FF&
BorderStyle = 1 'Fixed Single
Caption = "Label2"
Height = 15
Left = 0
TabIndex = 3
Top = 1035
Width = 7710
End
Begin VB.Label Label1
BackColor = &H00004000&
BackStyle = 0 'Transparent
Caption = "Comport"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 375
Left = 4590
TabIndex = 2
Top = 630
Width = 1185
End
Begin VB.Image Image1
Height = 6510
Left = -120
Picture = "frmSetting.frx":05CC
Top = -330
Width = 8655
End
End
End
Attribute VB_Name = "frmSetting"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
If frmMain.Visible = True Then
'giu lai trang thai luc truoc
cbComport.ListIndex = saveCom
cbBps.ListIndex = saveBps
cbDatabits.ListIndex = saveData
cbStopbits.ListIndex = saveStop
cbFlowcontrol.ListIndex = saveFlow
cbParityMulti.ListIndex = saveParityMulti
cbParityInver.ListIndex = saveParityInver
Me.Hide
Load frmMain
frmMain.Show
Else
End 'Lan khoi dong dau tien
End If
End Sub
Private Sub cmdHelp_Click()
MsgBox "Multimeter : 9600,E,8,1" & Chr(13) & Chr(10) & "Inverter : 9600,N,8,1", 0, "Note"
End Sub
Private Sub cmdOk_Click()
Dim parityInver, parityMulti
parityMulti = Left(cbParityMulti.Text, 1)
parityInver = Left(cbParityInver.Text, 1)
'frmMain.MSComm1.CommPort = cbComport.ListIndex + 1 'ListIndex bat dau bang tu 0
portsettingMulti = cbBps.Text & "," & parityMulti & "," & cbDatabits.Text & "," & cbStopbits.Text
portsettingInver = cbBps.Text & "," & parityInver & "," + cbDatabits.Text & "," & cbStopbits.Text
'luu tru data
saveCom = cbComport.ListIndex
saveBps = cbBps.ListIndex
saveData = cbDatabits.ListIndex
saveStop = cbStopbits.ListIndex
saveFlow = cbFlowcontrol.ListIndex
saveParityMulti = cbParityMulti.ListIndex
saveParityInver = cbParityInver.ListIndex
'Unload Me
Me.Hide
Load frmMain
frmMain.Show
End Sub
Private Sub Form_Load()
cbComport.ListIndex = 0 'Mac dinh Com1
cbBps.ListIndex = 5 'Mac dinh 9600 bps
cbParityMulti.ListIndex = 1 'Mac dinh parity Even
cbParityInver.ListIndex = 0
cbDatabits.ListIndex = 3 'Mac dinh data 8 bit
cbStopbits.ListIndex = 0 'Mac dinh 1 stop bits
cbFlowcontrol.ListIndex = 0 'Mac dinh che do khong bat tay
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -