📄 form1.frm
字号:
VERSION 5.00
Object = "{D940E4E4-6079-11CE-88CB-0020AF6845F6}#1.6#0"; "cwui.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6240
ClientLeft = 60
ClientTop = 450
ClientWidth = 10515
LinkTopic = "Form1"
ScaleHeight = 6240
ScaleWidth = 10515
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 3240
TabIndex = 1
Top = 5520
Width = 1095
End
Begin CWUIControlsLib.CWGraph CWGraph1
Height = 5295
Left = 120
TabIndex = 0
Top = 120
Width = 10335
_Version = 524288
_ExtentX = 18230
_ExtentY = 9340
_StockProps = 71
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Reset_0 = 0 'False
CompatibleVers_0= 524288
Graph_0 = 1
ClassName_1 = "CCWGraphFrame"
opts_1 = 62
C[0]_1 = 0
Event_1 = 2
ClassName_2 = "CCWGFPlotEvent"
Owner_2 = 1
Plots_1 = 3
ClassName_3 = "CCWDataPlots"
Array_3 = 5
Editor_3 = 4
ClassName_4 = "CCWGFPlotArrayEditor"
Owner_4 = 1
Array[0]_3 = 5
ClassName_5 = "CCWDataPlot"
opts_5 = 4194367
Name_5 = "Plot-1"
C[0]_5 = 255
C[1]_5 = 255
C[2]_5 = 16711680
C[3]_5 = 16776960
Event_5 = 2
X_5 = 6
ClassName_6 = "CCWAxis"
opts_6 = 575
Name_6 = "XAxis"
C[0]_6 = 2105376
C[1]_6 = 8421504
C[2]_6 = 0
C[3]_6 = 8421504
C[4]_6 = 8421504
Orientation_6 = 3712
format_6 = 7
ClassName_7 = "CCWFormat"
Scale_6 = 8
ClassName_8 = "CCWScale"
opts_8 = 90112
rMin_8 = 40
rMax_8 = 667
dMax_8 = 10
discInterval_8 = 1
Radial_6 = 0
Enum_6 = 9
ClassName_9 = "CCWEnum"
Editor_9 = 10
ClassName_10 = "CCWEnumArrayEditor"
Owner_10 = 6
Font_6 = 0
tickopts_6 = 2815
major_6 = 1
minor_6 = .5
Caption_6 = 11
ClassName_11 = "CCWDrawObj"
opts_11 = 62
C[0]_11 = 128
Image_11 = 12
ClassName_12 = "CCWTextImage"
style_12 = -1
font_12 = 0
Animator_11 = 0
Blinker_11 = 0
Y_5 = 13
ClassName_13 = "CCWAxis"
opts_13 = 1599
Name_13 = "YAxis-1"
C[0]_13 = 8421504
C[1]_13 = 8421504
C[3]_13 = 8421504
C[4]_13 = 8421504
Orientation_13 = 2067
format_13 = 14
ClassName_14 = "CCWFormat"
Scale_13 = 15
ClassName_15 = "CCWScale"
opts_15 = 122880
rMin_15 = 13
rMax_15 = 334
dMax_15 = 10
discInterval_15 = 1
Radial_13 = 0
Enum_13 = 16
ClassName_16 = "CCWEnum"
Editor_16 = 17
ClassName_17 = "CCWEnumArrayEditor"
Owner_17 = 13
Font_13 = 0
tickopts_13 = 2815
major_13 = 1
minor_13 = .5
Caption_13 = 18
ClassName_18 = "CCWDrawObj"
opts_18 = 62
C[0]_18 = -2147483640
Image_18 = 19
ClassName_19 = "CCWTextImage"
font_19 = 0
Animator_18 = 0
Blinker_18 = 0
LineStyle_5 = 1
LineWidth_5 = 1
BasePlot_5 = 0
DefaultXInc_5 = 1
DefaultPlotPerRow_5= -1 'True
Array[1]_3 = 20
ClassName_20 = "CCWDataPlot"
opts_20 = 4194367
Name_20 = "Plot-2"
C[0]_20 = 33023
C[1]_20 = 255
C[2]_20 = 16711680
C[3]_20 = 16776960
Event_20 = 2
X_20 = 6
Y_20 = 13
LineStyle_20 = 1
LineWidth_20 = 1
BasePlot_20 = 0
DefaultXInc_20 = 1
DefaultPlotPerRow_20= -1 'True
Array[2]_3 = 21
ClassName_21 = "CCWDataPlot"
opts_21 = 4194367
Name_21 = "Plot-3"
C[0]_21 = 65535
C[1]_21 = 255
C[2]_21 = 16711680
C[3]_21 = 16776960
Event_21 = 2
X_21 = 6
Y_21 = 13
LineStyle_21 = 1
LineWidth_21 = 1
BasePlot_21 = 0
DefaultXInc_21 = 1
DefaultPlotPerRow_21= -1 'True
Array[3]_3 = 22
ClassName_22 = "CCWDataPlot"
opts_22 = 4194367
Name_22 = "Plot-4"
C[0]_22 = 65280
C[1]_22 = 255
C[2]_22 = 16711680
C[3]_22 = 16776960
Event_22 = 2
X_22 = 6
Y_22 = 13
LineStyle_22 = 1
LineWidth_22 = 1
BasePlot_22 = 0
DefaultXInc_22 = 1
DefaultPlotPerRow_22= -1 'True
Array[4]_3 = 23
ClassName_23 = "CCWDataPlot"
opts_23 = 4194367
Name_23 = "Plot-5"
C[0]_23 = 16777215
C[1]_23 = 255
C[2]_23 = 16711680
C[3]_23 = 16776960
Event_23 = 2
X_23 = 6
Y_23 = 13
LineStyle_23 = 1
LineWidth_23 = 1
BasePlot_23 = 0
DefaultXInc_23 = 1
DefaultPlotPerRow_23= -1 'True
Axes_1 = 24
ClassName_24 = "CCWAxes"
Array_24 = 2
Editor_24 = 25
ClassName_25 = "CCWGFAxisArrayEditor"
Owner_25 = 1
Array[0]_24 = 6
Array[1]_24 = 13
DefaultPlot_1 = 26
ClassName_26 = "CCWDataPlot"
opts_26 = 4194367
Name_26 = "[Template]"
C[0]_26 = 65280
C[1]_26 = 255
C[2]_26 = 16711680
C[3]_26 = 16776960
Event_26 = 2
X_26 = 6
Y_26 = 13
LineStyle_26 = 1
LineWidth_26 = 1
BasePlot_26 = 0
DefaultXInc_26 = 1
DefaultPlotPerRow_26= -1 'True
Cursors_1 = 27
ClassName_27 = "CCWCursors"
Array_27 = 1
Editor_27 = 28
ClassName_28 = "CCWGFCursorArrayEditor"
Owner_28 = 1
Array[0]_27 = 29
ClassName_29 = "CCWCursor"
opts_29 = 63
Name_29 = "Cursor-1"
C[0]_29 = 16711680
Event_29 = 2
X_29 = 0
Y_29 = 0
XPos_29 = 1
YPos_29 = 1
PointIndex_29 = -1
ChrosshairStyle_29= 2
LockPlot_29 = 0
TrackMode_1 = 2
ChartStyle_1 = 1
GraphFrameStyle_1= 1
GraphBackground_1= 0
GraphFrame_1 = 30
ClassName_30 = "CCWDrawObj"
opts_30 = 62
Image_30 = 31
ClassName_31 = "CCWPictImage"
opts_31 = 1280
Rows_31 = 1
Cols_31 = 1
Pict_31 = 450
F_31 = -2147483633
B_31 = -2147483633
ColorReplaceWith_31= 8421504
ColorReplace_31 = 8421504
Tolerance_31 = 2
Animator_30 = 0
Blinker_30 = 0
PlotFrame_1 = 32
ClassName_32 = "CCWDrawObj"
opts_32 = 62
C[1]_32 = 0
Image_32 = 33
ClassName_33 = "CCWPictImage"
opts_33 = 1280
Rows_33 = 1
Cols_33 = 1
Pict_33 = 1
F_33 = -2147483633
B_33 = 0
ColorReplaceWith_33= 8421504
ColorReplace_33 = 8421504
Tolerance_33 = 2
Animator_32 = 0
Blinker_32 = 0
Caption_1 = 34
ClassName_34 = "CCWDrawObj"
opts_34 = 62
C[0]_34 = -2147483640
Image_34 = 35
ClassName_35 = "CCWTextImage"
font_35 = 0
Animator_34 = 0
Blinker_34 = 0
DefaultXInc_1 = 1
DefaultPlotPerRow_1= -1 'True
Bindings_1 = 36
ClassName_36 = "CCWBindingHolderArray"
Editor_36 = 37
ClassName_37 = "CCWBindingHolderArrayEditor"
Owner_37 = 1
Annotations_1 = 38
ClassName_38 = "CCWAnnotations"
Editor_38 = 39
ClassName_39 = "CCWAnnotationArrayEditor"
Owner_39 = 1
AnnotationTemplate_1= 40
ClassName_40 = "CCWAnnotation"
opts_40 = 63
Name_40 = "[Template]"
Plot_40 = 26
Text_40 = "[Template]"
TextXPoint_40 = 6.7
TextYPoint_40 = 6.7
TextColor_40 = 16777215
TextFont_40 = 41
ClassName_41 = "CCWFont"
bFont_41 = -1 'True
BeginProperty Font_41 {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ShapeXPoints_40 = 42
ClassName_42 = "CDataBuffer"
Type_42 = 5
m_cDims;_42 = 1
m_cElts_42 = 1
Element[0]_42 = 3.3
ShapeYPoints_40 = 43
ClassName_43 = "CDataBuffer"
Type_43 = 5
m_cDims;_43 = 1
m_cElts_43 = 1
Element[0]_43 = 3.3
ShapeFillColor_40= 16777215
ShapeLineColor_40= 16777215
ShapeLineWidth_40= 1
ShapeLineStyle_40= 1
ShapePointStyle_40= 10
ShapeImage_40 = 44
ClassName_44 = "CCWDrawObj"
opts_44 = 62
Image_44 = 45
ClassName_45 = "CCWPictImage"
opts_45 = 1280
Rows_45 = 1
Cols_45 = 1
Pict_45 = 7
F_45 = -2147483633
B_45 = -2147483633
ColorReplaceWith_45= 8421504
ColorReplace_45 = 8421504
Tolerance_45 = 2
Animator_44 = 0
Blinker_44 = 0
ArrowVisible_40 = -1 'True
ArrowColor_40 = 16777215
ArrowWidth_40 = 1
ArrowLineStyle_40= 1
ArrowHeadStyle_40= 1
End
Begin VB.Label LabMsgX
AutoSize = -1 'True
Caption = "Label1"
Height = 180
Left = 480
TabIndex = 2
Top = 5640
Width = 540
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 waveform() As Double, I%, J%, tR#, tLen#
ReDim waveform(0 To 1000)
For I = 0 To 1000
waveform(I) = 100 * Sin(I / 10)
Next I
CWGraph1.Axes(1).Maximum = 1000
CWGraph1.Axes(1).Minimum = 0
' CWGraph1.PlotY waveform, 0, 1
For J = 1 To CWGraph1.Plots.Count
tR = Rnd * 100
tLen = Rnd * 500
For I = 0 To 1000
waveform(I) = tLen * Sin(I / tR)
Next I
' CWGraph1.Axes(2).Maximum = 1000
' CWGraph1.Axes(2).Minimum = 0
' CWGraph1.PlotY waveform, 0, 1
CWGraph1.Plots(J).PlotY waveform, 0, 1
Next J
End Sub
Private Sub CWGraph1_CursorChange(CursorIndex As Long, XPos As Variant, YPos As Variant, bTracking As Boolean)
LabMsgX.Caption = "X:" & XPos
End Sub
Private Sub Form_Load()
Dim tColor!
tColor = &H202040
CWGraph1.Axes(1).Ticks.MajorGridColor = tColor
CWGraph1.Axes(1).Ticks.MajorTickColor = tColor
CWGraph1.Axes(1).Ticks.MinorGridColor = tColor
CWGraph1.Axes(1).Ticks.MinorTickColor = tColor
'
CWGraph1.Axes(2).Ticks.MajorGridColor = tColor
CWGraph1.Axes(2).Ticks.MajorTickColor = tColor
CWGraph1.Axes(2).Ticks.MinorGridColor = tColor
CWGraph1.Axes(2).Ticks.MinorTickColor = tColor
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -