
早就想亲自DIY一个类似Windwos任务管理器中的CPU和内存的曲线图,因时间关系直到现在才如愿以偿。虽然做的粗糙点,但勉强说的过去。
功能:可以设置是否显示值刻度、网格、曲线、时间刻度等,可以定义背景颜色、网格颜色、刻度颜色、曲线颜色等,可以设置网格大小、刻度间隔、曲线进展长度,最重要的是可以支持多曲线运行。
名称:Graph
VERSION 5.00
Begin VB.UserControl Graph
AutoRedraw = -1 ’True
BackColor = &H00000000&
ClientHeight = 1605
ClientLeft = 0
ClientTop = 0
ClientWidth = 2880
ForeColor = &H8000000B&
HitBehavior = 0 ’无
ScaleHeight = 1605
ScaleWidth = 2880
End
Attribute VB_Name = "Graph"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private m_Coll() As Collection
Private m_Color() As OLE_COLOR
Private m_Time As Collection
Private m_MaxValue As Single
Private m_ScaleColor As OLE_COLOR
Private m_GridColor As OLE_COLOR
Private m_CellWidth As Single
Private m_CellHeight As Single
Private m_Spaced As Single
Private m_ValueScale As Single
Private m_TimeScale As Long
Private m_ShowGraph As Boolean
Private m_ShowGrid As Boolean
Private m_ShowValueScale As Boolean
Private m_ShowTimeScale As Boolean
’背景颜色
Public Property Get BackColor() As OLE_COLOR
BackColor = UserControl.BackColor
End Property
Public Property Let BackColor(ByVal Value As OLE_COLOR)
UserControl.BackColor = Value
Call AddValue 早就想亲自DIY一个类似Windwos任务管理器中的CPU和内存的曲线图,因时间关系直到现在才如愿以偿。虽然做的粗糙点,但勉强说的过去。
功能:可以设置是否显示值刻度、网格、曲线、时间刻度等,可以定义背景颜色、网格颜色、刻度颜色、曲线颜色等,可以设置网格大小、刻度间隔、曲线进展长度,最重要的是可以支持多曲线运行。
名称:Graph
VERSION 5.00
Begin VB.UserControl Graph
AutoRedraw = -1 ’True
BackColor = &H00000000&
ClientHeight = 1605
ClientLeft = 0
ClientTop = 0
ClientWidth = 2880
ForeColor = &H8000000B&
HitBehavior = 0 ’无
ScaleHeight = 1605
ScaleWidth = 2880
End
Attribute VB_Name = "Graph"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private m_Coll() As Collection
Private m_Color() As OLE_COLOR
Private m_Time As Collection
Private m_MaxValue As Single
Private m_ScaleColor As OLE_COLOR
Private m_GridColor As OLE_COLOR
Private m_CellWidth As Single
Private m_CellHeight As Single
Private m_Spaced As Single
Private m_ValueScale As Single
Private m_TimeScale As Long
Private m_ShowGraph As Boolean
Private m_ShowGrid As Boolean
Private m_ShowValueScale As Boolean
Private m_ShowTimeScale As Boolean
End Property
Public Property Let BackColor(ByVal Value As OLE_COLOR)
UserControl.BackColor = Value
Call AddValue
Call AddValue
PropertyChanged "ShowTimeScale"
End Property
’单格宽度
Public Property Get CellWidth() As Single
CellWidth = m_CellWidth
End Property
Public Property Let CellWidth(ByVal Value As Single)
m_CellWidth = Value
Call AddValue
PropertyChanged "CellWidth"
End Property
’单格宽度
Public Property Get CellHeight() As Single
CellHeight = m_CellHeight
End Property
Public Property Let CellHeight(ByVal Value As Single)
m_CellHeight = Value
Call AddValue
PropertyChanged "CellHeight"
End Property
’值间隔