成都创新互联网站制作重庆分公司

vb.net曲线控件,vb画函数曲线

VB.NET 实时曲线

拖一个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()就行了

创新互联专注于远安网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供远安营销型网站建设,远安网站制作、远安网页设计、远安网站官网定制、小程序定制开发服务,打造远安网络公司原创品牌,更为您提供远安网站排名全网营销落地服务。

vb.net中,我用picturebox控件画曲线。使用picturebox.CreateGraphics()画线,请教保存问题??

首先你要建一个 Bitmap

再将picture控件的image属性与之相关联

再到 picture的image上画线

保存image到文件

/////////////////////////////////

Dim mybitmap As Bitmap

mybitmap = New Bitmap(300, 150)

PictureBox0.Image = mybitmap

Dim Graph As Graphics

Graph =Graphics.FromImage(PictureBox0.image)

Graph .drawline(Pens.Blue,0,0,111,111)

picturebox0.image.save("c:\aaa.jpg")

/////////////////////////////////////

存成的文件绝对有你画的线..我一直在用这种方法

vb.net中怎样曲线图,棒图,和饼图

vb2010以后的版本就自带Chart控件了,比如

Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie '饼图


文章名称:vb.net曲线控件,vb画函数曲线
URL分享:http://cxhlcq.com/article/dsgoeos.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部