📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 3 'Fixed Dialog
Caption = "图形显示"
ClientHeight = 10140
ClientLeft = 45
ClientTop = 435
ClientWidth = 15210
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 10140
ScaleWidth = 15210
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command16
Caption = "关闭定时器3"
Height = 615
Left = 6120
TabIndex = 33
Top = 2160
Width = 1215
End
Begin VB.CommandButton Command15
Caption = "打开定时器3"
Height = 615
Left = 4440
TabIndex = 32
Top = 2160
Width = 1215
End
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 1000
Left = 3720
Top = 2280
End
Begin VB.CommandButton Command14
Caption = "关闭定时器2"
Height = 495
Left = 7200
TabIndex = 31
Top = 600
Width = 1095
End
Begin VB.CommandButton Command13
Caption = "置记录指针为0"
Height = 615
Left = 1920
TabIndex = 30
Top = 9000
Width = 1215
End
Begin VB.TextBox Text4
Height = 615
Index = 4
Left = 10560
TabIndex = 29
Text = "Text4"
Top = 1320
Width = 1335
End
Begin VB.TextBox Text4
Height = 615
Index = 3
Left = 8880
TabIndex = 28
Text = "Text4"
Top = 1320
Width = 1335
End
Begin VB.TextBox Text4
Height = 615
Index = 2
Left = 7320
TabIndex = 27
Text = "Text4"
Top = 1320
Width = 1335
End
Begin VB.TextBox Text4
Height = 615
Index = 1
Left = 5520
TabIndex = 26
Text = "Text4"
Top = 1320
Width = 1335
End
Begin VB.TextBox Text4
Height = 615
Index = 0
Left = 3600
TabIndex = 25
Text = "Text4"
Top = 1320
Width = 1335
End
Begin VB.CommandButton Command12
Caption = "参数设定"
Height = 615
Left = 4080
TabIndex = 24
Top = 9000
Width = 1335
End
Begin VB.CommandButton Command11
Caption = "读出文件"
Height = 615
Left = 9600
TabIndex = 23
Top = 9000
Width = 1215
End
Begin VB.CommandButton Command10
Caption = "添加一条新记录"
Height = 615
Left = 7800
TabIndex = 22
Top = 9000
Width = 1215
End
Begin VB.CommandButton Command9
Caption = "打开新生成的文件"
Height = 615
Left = 5880
TabIndex = 21
Top = 9000
Width = 1455
End
Begin VB.CommandButton Command8
Caption = "Command8"
Height = 615
Left = 240
TabIndex = 20
Top = 1320
Width = 855
End
Begin VB.CommandButton Command7
Caption = "Command7"
Height = 735
Left = 360
TabIndex = 19
Top = 5880
Width = 1575
End
Begin VB.HScrollBar HS1
Height = 375
LargeChange = 30
Left = 3000
SmallChange = 10
TabIndex = 18
Top = 8160
Width = 10095
End
Begin VB.CommandButton Command2
Caption = "打开定时器2"
Height = 495
Left = 7200
TabIndex = 14
Top = 0
Width = 1095
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 180
Left = 6360
Top = 240
End
Begin VB.CommandButton Command6
Caption = "设置下差"
Height = 495
Left = 1920
TabIndex = 13
Top = 4920
Width = 855
End
Begin VB.TextBox Text3
Height = 495
Left = 600
TabIndex = 12
Text = "Text3"
Top = 4920
Width = 975
End
Begin VB.CommandButton Command5
Caption = "设置上差"
Height = 615
Left = 1920
TabIndex = 9
Top = 3840
Width = 855
End
Begin VB.TextBox Text2
Height = 615
Left = 600
TabIndex = 8
Text = "Text2"
Top = 3840
Width = 975
End
Begin VB.CommandButton Command4
Caption = "设定值"
Height = 615
Left = 1920
TabIndex = 5
Top = 2520
Width = 855
End
Begin VB.TextBox Text1
Height = 525
Left = 600
TabIndex = 3
Text = "Text1"
Top = 2640
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "打开定时器"
Height = 615
Left = 4680
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 200
Left = 3960
Top = 240
End
Begin VB.CommandButton Command1
Caption = "设置图像框的坐标系"
Height = 735
Left = 120
TabIndex = 1
Top = 240
Width = 1935
End
Begin VB.PictureBox Pic
BackColor = &H00004000&
Height = 5055
Left = 3120
ScaleHeight = 333
ScaleMode = 3 'Pixel
ScaleWidth = 661
TabIndex = 0
Top = 3000
Width = 9975
End
Begin VB.Label Label8
Caption = "Label8"
Height = 375
Left = 11280
TabIndex = 17
Top = 120
Width = 975
End
Begin VB.Label Label7
Caption = "Label7"
Height = 375
Left = 10200
TabIndex = 16
Top = 120
Width = 855
End
Begin VB.Label Label6
Caption = "Label6"
Height = 255
Left = 10200
TabIndex = 15
Top = 600
Width = 1095
End
Begin VB.Label Label5
Caption = "下差"
Height = 255
Left = 600
TabIndex = 11
Top = 4560
Width = 975
End
Begin VB.Label Label4
Caption = "上差"
Height = 375
Left = 600
TabIndex = 10
Top = 3360
Width = 975
End
Begin VB.Shape Shape2
BackColor = &H0000FF00&
BackStyle = 1 'Opaque
Height = 735
Left = 1440
Top = 7320
Width = 855
End
Begin VB.Shape Shape1
BackColor = &H0000FF00&
BackStyle = 1 'Opaque
Height = 735
Left = 1320
Top = 1440
Width = 855
End
Begin VB.Label Label3
Caption = "Label3"
Height = 495
Left = 8880
TabIndex = 7
Top = 600
Width = 1095
End
Begin VB.Label Label2
Caption = "实时值"
Height = 255
Left = 8880
TabIndex = 6
Top = 120
Width = 975
End
Begin VB.Label Label1
Caption = "设定值"
Height = 255
Left = 600
TabIndex = 4
Top = 2280
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SetValue As Single '设定值
Dim UpValue As Single '上差
Dim DownValue As Single '下差
Dim DataFromCom As Single '定义实时从COM口传过来的数据
Dim TimeCount As Integer '模拟定时器1的计数器
Dim AverageCount As Byte '求平均值的定时器逢6清零
Dim TempValue(5) As Single '保存存贮的6个临时值
Dim AverageValue As Single '1秒中6个值的平均值
Dim AverageValue2 As Single '回放时的1秒中6个值的平均值
Dim AverageValueLast As Single '上一个平均值
Dim AveragevalueLast2 As Single '回放时的上个平均值
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -