利用VB画多曲线.docx
《利用VB画多曲线.docx》由会员分享,可在线阅读,更多相关《利用VB画多曲线.docx(7页珍藏版)》请在冰点文库上搜索。
![利用VB画多曲线.docx](https://file1.bingdoc.com/fileroot1/2023-7/5/d4701dce-1aae-452b-aa71-0d503f8f7437/d4701dce-1aae-452b-aa71-0d503f8f74371.gif)
利用VB画多曲线
名称:
Graph
VERSION5.00
BeginVB.UserControlGraph
AutoRedraw=-1'True
BackColor=&H00000000&
ClientHeight=1605
ClientLeft=0
ClientTop=0
ClientWidth=2880
ForeColor=&H8000000B&
HitBehavior=0'无
ScaleHeight=1605
ScaleWidth=2880
End
AttributeVB_Name="Graph"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=True
AttributeVB_PredeclaredId=False
AttributeVB_Exposed=False
OptionExplicit
Privatem_Coll()AsCollection
Privatem_Color()AsOLE_COLOR
Privatem_TimeAsCollection
Privatem_MaxValueAsSingle
Privatem_ScaleColorAsOLE_COLOR
Privatem_GridColorAsOLE_COLOR
Privatem_CellWidthAsSingle
Privatem_CellHeightAsSingle
Privatem_SpacedAsSingle
Privatem_ValueScaleAsSingle
Privatem_TimeScaleAsLong
Privatem_ShowGraphAsBoolean
Privatem_ShowGridAsBoolean
Privatem_ShowValueScaleAsBoolean
Privatem_ShowTimeScaleAsBoolean
'背景颜色
PublicPropertyGetBackColor()AsOLE_COLOR
BackColor=UserControl.BackColor
EndProperty
PublicPropertyLetBackColor(ByValValueAsOLE_COLOR)
UserControl.BackColor=Value
CallAddValue
PropertyChanged"BackColor"
EndProperty
'数字颜色
PublicPropertyGetScaleColor()AsOLE_COLOR
ScaleColor=m_ScaleColor
EndProperty
PublicPropertyLetScaleColor(ByValValueAsOLE_COLOR)
m_ScaleColor=Value
CallAddValue
PropertyChanged"ScaleColor"
EndProperty
'网格颜色
PublicPropertyGetGridColor()AsOLE_COLOR
GridColor=m_GridColor
EndProperty
PublicPropertyLetGridColor(ByValValueAsOLE_COLOR)
m_GridColor=Value
CallAddValue
PropertyChanged"GridColor"
EndProperty
'曲线是否可见
PublicPropertyGetShowGraph()AsBoolean
ShowGraph=m_ShowGraph
EndProperty
PublicPropertyLetShowGraph(ByValValueAsBoolean)
m_ShowGraph=Value
CallAddValue
PropertyChanged"ShowGraph"
EndProperty
'网格是否可见
PublicPropertyGetShowGrid()AsBoolean
ShowGrid=m_ShowGrid
EndProperty
PublicPropertyLetShowGrid(ByValValueAsBoolean)
m_ShowGrid=Value
CallAddValue
PropertyChanged"ShowGrid"
EndProperty
'值刻度是否可见
PublicPropertyGetShowValueScale()AsBoolean
ShowValueScale=m_ShowValueScale
EndProperty
PublicPropertyLetShowValueScale(ByValValueAsBoolean)
m_ShowValueScale=Value
CallAddValue
PropertyChanged"ShowValueScale"
EndProperty
'时间刻度是否可见
PublicPropertyGetShowTimeScale()AsBoolean
ShowTimeScale=m_ShowTimeScale
EndProperty
PublicPropertyLetShowTimeScale(ByValValueAsBoolean)
m_ShowTimeScale=Value
CallAddValue
PropertyChanged"ShowTimeScale"
EndProperty
'单格宽度
PublicPropertyGetCellWidth()AsSingle
CellWidth=m_CellWidth
EndProperty
PublicPropertyLetCellWidth(ByValValueAsSingle)
m_CellWidth=Value
CallAddValue
PropertyChanged"CellWidth"
EndProperty
'单格宽度
PublicPropertyGetCellHeight()AsSingle
CellHeight=m_CellHeight
EndProperty
PublicPropertyLetCellHeight(ByValValueAsSingle)
m_CellHeight=Value
CallAddValue
PropertyChanged"CellHeight"
EndProperty
'值间隔
PublicPropertyGetSpaced()AsLong
Spaced=m_Spaced
EndProperty
PublicPropertyLetSpaced(ByValValueAsLong)
m_Spaced=Value
CallAddValue
PropertyChanged"Spaced"
EndProperty
'值刻度
PublicPropertyGetValueScale()AsLong
ValueScale=m_ValueScale
EndProperty
PublicPropertyLetValueScale(ByValValueAsLong)
m_ValueScale=Value
CallAddValue
PropertyChanged"ValueScale"
EndProperty
'时间刻度
PublicPropertyGetTimeScale()AsLong
TimeScale=m_TimeScale
EndProperty
PublicPropertyLetTimeScale(ByValValueAsLong)
m_TimeScale=Value
PropertyChanged"TimeScale"
EndProperty
'最大比例
PublicPropertyGetMaxValue()AsSingle
MaxValue=m_MaxValue
EndProperty
PublicPropertyLetMaxValue(ByValValueAsSingle)
m_MaxValue=Value
CallAddValue
PropertyChanged"MaxValue"
EndProperty
'曲线个数
PublicPropertyGetGraphCount()AsLong
OnErrorResumeNext
GraphCount=UBound(m_Coll)+1
EndProperty
PrivateSubUserControl_Resize()
CallAddValue
EndSub
还是用微软的MsChart控件吧