📄 frmvisualize.frm
字号:
VERSION 5.00
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Begin VB.Form frmVisualize
Caption = "Data Visualisation"
ClientHeight = 7260
ClientLeft = 60
ClientTop = 300
ClientWidth = 8610
LinkTopic = "Form1"
MousePointer = 1 'Arrow
ScaleHeight = 7260
ScaleWidth = 8610
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton CommandClose
Caption = "Close"
Height = 375
Left = 6720
TabIndex = 11
Top = 6600
Width = 1335
End
Begin VB.CommandButton cmdDraw
Caption = "Draw"
Height = 375
Left = 4800
TabIndex = 10
Top = 6600
Width = 1575
End
Begin VB.Frame fraChannels
Caption = "Channels to Plot"
Height = 2295
Left = 240
TabIndex = 1
Top = 4800
Width = 1575
Begin VB.CheckBox chkChannel
Caption = "Channel 7"
Height = 255
Index = 7
Left = 120
TabIndex = 9
Top = 1920
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 6"
Height = 255
Index = 6
Left = 120
TabIndex = 8
Top = 1680
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 5"
Height = 255
Index = 5
Left = 120
TabIndex = 7
Top = 1440
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 4"
Height = 255
Index = 4
Left = 120
TabIndex = 6
Top = 1200
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 3"
Height = 255
Index = 3
Left = 120
TabIndex = 5
Top = 960
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 2"
Height = 255
Index = 2
Left = 120
TabIndex = 4
Top = 720
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 1"
Height = 255
Index = 1
Left = 120
TabIndex = 3
Top = 480
Width = 1335
End
Begin VB.CheckBox chkChannel
Caption = "Channel 0"
Height = 255
Index = 0
Left = 120
TabIndex = 2
Top = 240
Width = 1335
End
End
Begin MSChart20Lib.MSChart chartChannels
Height = 4215
Left = 120
OleObjectBlob = "frmVisualize.frx":0000
TabIndex = 0
Top = 120
Width = 8295
End
End
Attribute VB_Name = "frmVisualize"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdDraw_Click()
' Die gesampelten Daten werden graphisch angezeigt
Dim laenge As Long
Dim tiefe As Integer
Dim tiefeinchart As Integer
Dim abstand As Single
Dim iteratex As Long
Dim iteratec As Long
Dim Msg, Style, Title, Response, MyString As String
' alte Daten loeschen:
chartChannels.ColumnCount = 0
chartChannels.RowCount = 0
If DatenInMessArr = True Then
' Es sind also gueltige Daten im MessArr, also anzeigen ...
laenge = CInt(Val(MessHeader.MLength))
' Tiefe des Arrays zaehlen:
tiefe = 0
For iteratex = 0 To 7
If chkChannel(iteratex).Value = 1 Then
tiefe = tiefe + 1
End If
Next iteratex
'
If tiefe > 0 Then
With chartChannels
.chartType = VtChChartType2dLine
.ColumnCount = tiefe
.RowCount = laenge
tiefeinchart = 0
For iteratec = 0 To 7
If chkChannel.Item(iteratec).Value = 1 Then
tiefeinchart = tiefeinchart + 1
.Column = tiefeinchart
For iteratex = 0 To laenge - 1
.Row = iteratex + 1
.Data = MessArr(iteratex, iteratec)
Next iteratex
End If
Next iteratec
End With
End If
Else
Msg = "Es existieren keine Daten. Zuerst welche sampeln oder laden."
Style = vbOK + vbDefaultButton1
Title = "Keine Daten!"
Response = MsgBox(Msg, Style, Title)
' user will offenbar Daten nicht verwerfen.
End If
End Sub
Private Sub CommandClose_Click()
frmVisualize.Hide
End Sub
Private Sub Form_Load()
chartChannels.ColumnCount = 0
chartChannels.RowCount = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -