资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

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画函数曲线
文章来源:http://cdkjz.cn/article/dsgoeos.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220