display.frm
来自「16 relay output channels and 16 isolated」· FRM 代码 · 共 105 行
FRM
105 行
VERSION 5.00
Begin VB.Form frmDisp
BorderStyle = 3 'Fixed Dialog
Caption = "Display"
ClientHeight = 1590
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 4830
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1590
ScaleWidth = 4830
ShowInTaskbar = 0 'False
Begin VB.TextBox txtStopPt
Height = 375
Left = 1680
TabIndex = 5
Text = "Edit"
Top = 960
Width = 1215
End
Begin VB.TextBox txtStartPt
Height = 375
Left = 1680
TabIndex = 4
Text = "Edit"
Top = 240
Width = 1215
End
Begin VB.CommandButton CancelButton
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 3360
TabIndex = 1
Top = 960
Width = 1095
End
Begin VB.CommandButton OKButton
Caption = "OK"
Default = -1 'True
Height = 375
Left = 3360
TabIndex = 0
Top = 240
Width = 1095
End
Begin VB.Label Label1
Caption = "Stop Pt."
Height = 375
Index = 1
Left = 360
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.Label Label1
Caption = "Start Pt."
Height = 375
Index = 0
Left = 360
TabIndex = 2
Top = 240
Width = 1095
End
End
Attribute VB_Name = "frmDisp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
txtStartPt.Text = gDevPar.lStartPoint
txtStopPt.Text = gDevPar.lStopPoint
End Sub
Private Sub OKButton_Click()
'get start point and stop point
If (Not IsNumeric(txtStartPt.Text)) Then
MsgBox "Please input Numeric Start Point!", vbOKOnly Or vbInformation, "Error"
Exit Sub
End If
If (Not IsNumeric(txtStopPt.Text)) Then
MsgBox "Please input Numeric Stop Point!", vbOKOnly Or vbInformation, "Error"
Exit Sub
End If
If ((Val(txtStartPt.Text) > gDevPar.lConvNum - 1) Or _
(Val(txtStopPt.Text) > gDevPar.lConvNum - 1)) Then
MsgBox "Start Point or Stop Point is out of range(0-" & _
(gDevPar.lConvNum - 1) & ")!", vbOKOnly Or vbInformation, "Error"
Exit Sub
End If
gDevPar.lStartPoint = Val(txtStartPt.Text)
gDevPar.lStopPoint = Val(txtStopPt.Text)
Unload Me
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?