在VB6.0中是否可以绘制心电?由于我不太熟悉VB,所以任何类型的帮助都会提前帮助我( help me appreciated.Please .thanks )。
发布于 2012-09-19 00:01:37
执行此操作的最简单方法是使用AutoRedraw属性设置为true且ScaleMode设置为vbPixels的图片框。
对于每个点,计算Y值(取决于允许的最小值和最大值)。要使其进行扫描,只需在达到图片框(.ScaleWidth)的宽度时,将您绘制的每个折叠点的X值增加到0即可。
您可以使用图片框的.Line方法消隐当前X点后面的区域,并使用.PSet方法绘制新点。
Dim X As Long
Dim LastValue As Long
Private Sub AddPoint(ByVal Value As Long)
'Clear the line behind (for 5 pixels forward)
Picture1.Line (X, 0)-(X + 5, Picture1.ScaleHeight), vbBlack, BF
'Draw the new point and the line from the previous point
Picture1.Line (X - 1, LastValue)-(X, Value), vbGreen
Picture1.PSet (X, Value), vbGreen
'Update the last value so we can draw the line between them
LastValue = Value
'Increment the X value for the next point
X = X + 1
If X = Picture1.ScaleWidth Then X = 0
End Sub一种更好的方法是使用您使用类似方法更新的屏幕外图片,并在需要时仅更新picturebox。
https://stackoverflow.com/questions/12479055
复制相似问题