vb.net画曲线图 vb如何绘制曲线图( 三 )


End Sub
Private Sub PicMidleLine(picX As PictureBox) '在图像框中画一条中线
picX.Line (0, 0)-(picX.ScaleWidth, 0), vbGreen '画出中线
End Sub
Private Sub DrawRealLine(picX As PictureBox, TimeCountX As Integer, DataFromComX As Integer, DataFromComLastX As Integer)
If TimeCountX - 10 Then
picX.Line ((TimeCountX - 1) * 10, DataFromComLastX)-(TimeCountX * 10, DataFromComX), vbWhite
End If
End Sub
Private Sub Timer1_Timer()
DataFromComLast = DataFromCom
Randomize
DataFromCom = 3000 * Rnd
TimeCount = TimeCount + 1
DrawRealLine Pic, TimeCount, DataFromCom, DataFromComLast '画出实时的曲线
End Sub
vb.net画曲线图的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vb如何绘制曲线图、vb.net画曲线图的信息别忘了在本站进行查找喔 。

推荐阅读