VB.NET 实时曲线
答案:2 悬赏:30
解决时间 2021-02-22 22:44
- 提问者网友:伪善人独行者
- 2021-02-22 03:36
VB.NET如何绘制实时曲线,想把CPU使用率以曲线形式显示,就像任务管理器的曲线一样,用PictureBox控件,只有一个参数。
最佳答案
- 二级知识专家网友:时光挺欠揍
- 2021-02-22 04:43
拖一个PictureBox1控件 创建一个Paint事件。在事件中加入 Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint ' Create pens. Dim redPen As New Pen(Color.Red, 3) Dim greenPen As New Pen(Color.Green, 3) ' Create points that define curve. Dim point1 As New Point(50, 50) Dim point2 As New Point(100, 25) Dim point3 As New Point(200, 5) Dim point4 As New Point(250, 50) Dim point5 As New Point(300, 100) Dim point6 As New Point(350, 200) Dim point7 As New Point(250, 250) Dim curvePoints As Point() = {point1, point2, point3, point4, _ point5, point6, point7} ' Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints) ' Draw curve to screen. e.Graphics.DrawCurve(greenPen, curvePoints) End Sub 得到数据后,改point的数据。然后PictureBox1.Refresh()就行了
全部回答
- 1楼网友:风格单纯
- 2021-02-22 04:51
这个有点儿难度。还是找个商业控件比较靠谱。
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯