📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "显示波形"
ClientHeight = 9150
ClientLeft = 60
ClientTop = 465
ClientWidth = 10785
LinkTopic = "Form1"
ScaleHeight = 9150
ScaleWidth = 10785
StartUpPosition = 3 '窗口缺省
Begin VB.HScrollBar HScroll2
Height = 255
LargeChange = 200
Left = 240
Max = 6399
SmallChange = 100
TabIndex = 7
Top = 3960
Width = 9975
End
Begin VB.HScrollBar HScroll1
Height = 255
LargeChange = 200
Left = 240
Max = 6399
SmallChange = 100
TabIndex = 6
Top = 2040
Width = 9975
End
Begin VB.CommandButton Command4
Caption = "返回"
Height = 1140
Left = 5400
TabIndex = 5
Top = 6000
Width = 1815
End
Begin VB.PictureBox Picture2
Height = 1455
Left = 480
ScaleHeight = 1395
ScaleWidth = 9435
TabIndex = 4
Top = 2520
Width = 9495
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 1095
Left = 8040
TabIndex = 3
Top = 6000
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "继续"
Height = 1095
Left = 3240
TabIndex = 2
Top = 6000
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "显示"
Height = 1095
Left = 1320
TabIndex = 1
Top = 6000
Width = 1455
End
Begin VB.PictureBox Picture1
Height = 1455
Left = 480
ScaleHeight = 1395
ScaleWidth = 9435
TabIndex = 0
Top = 600
Width = 9495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim k As Variant
Picture1.Scale (0, 0.02)-(2000, -0.02)
For k = 1 To 1999 Step 1
Picture1.Line (k, rb0(k))-(k + 1, rb0(k + 1))
Next k
Dim n As Variant
Picture2.Scale (0, 0.3)-(2000, -0.3)
For n = 1 To 1999 Step 1
Picture2.Line (n, HFECG1(n))-(n + 1, HFECG1(n + 1))
Next n
End Sub
Private Sub Command2_Click()
Form2.Show
Form1.Hide
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
frm_HFECG2.Show
Form1.Hide
End Sub
Private Sub HScroll1_Change()
Static x As Integer
If HScroll1.Value > x Then
Picture1.Cls
x = HScroll1.Value
Picture1.Scale (x, 0.02)-(x + 2000, -0.02)
For k = x To x + 1999 Step 1
Picture1.Line (k, rb0(k))-(k + 1, rb0(k + 1))
Next k
Else
Picture1.Cls
x = HScroll1.Value
Picture1.Scale (x, 0.02)-(x + 2000, -0.02)
For k = x To x + 1999 Step 1
Picture1.Line (k, rb0(k))-(k + 1, rb0(k + 1))
Next k
End If
End Sub
Private Sub HScroll2_Change()
Static i As Integer
If HScroll2.Value > i Then
Picture2.Cls
i = HScroll2.Value
Picture2.Scale (i, 0.3)-(i + 2000, -0.3)
For k = i To i + 1999 Step 1
Picture2.Line (k, HFECG1(k))-(k + 1, HFECG1(k + 1))
Next k
Else
Picture2.Cls
i = HScroll2.Value
Picture2.Scale (i, 0.3)-(i + 2000, -0.3)
For k = i To i + 1999 Step 1
Picture2.Line (k, HFECG1(k))-(k + 1, HFECG1(k + 1))
Next k
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -