Private Sub PictureBox2_Paint(sender As Object, e As PaintEventArgs) Handles PictureBox2.Paint
霍山網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)公司,霍山網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為霍山上1000家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的霍山做網(wǎng)站的公司定做!
Dim points As New List(Of Point)
points.Add(New Point(0, 0))
points.Add(New Point(1, 10))
points.Add(New Point(3, 15))
points.Add(New Point(14, 0))
points.Add(New Point(20, 60))
points.Add(New Point(40, 20))
points.Add(New Point(70, 50))
e.Graphics.DrawCurve(Pens.Red, points.ToArray)
End Sub
供參考,points可設(shè)為全局變量,那樣add隨便在哪增加,想要看見看上去動(dòng)態(tài)的圖,那就在新增完n個(gè)后,繼續(xù)增加n+1個(gè)之時(shí),放棄points中的第一個(gè)。
您好,您是想問vb.net連續(xù)繪制曲線圖不消失怎么辦?b.net連續(xù)繪制曲線圖不消失的解決辦法如下:
1、首先必須創(chuàng)建bitmap,關(guān)聯(lián)到picturebox1.image上。
2、再在picturebox1.image上創(chuàng)建Graphics,再進(jìn)行作圖。即可顯示線圖。
Beginning VB 2008 從入門到精通 ;ID=181830 Pro VB 2008 and the .NET 3.5 Platform ;ID=184746 Visual Basic 2008 Programmerss Reference ;ID=181605 Apress Accelerated VB 2008 ;ID=181504 Visual Basic 2008 Step by Step Wrox Professional VB 2005 with .NET 3.0 ;ID=158893 Build A Program Now Visual Basic 2005 ;ID=146029 .NET游戲編程入門經(jīng)典—VB.NET篇 ;ID=158821 O'Reilly Visual Basic 2005 Cookbook ;ID=160654 .NET Insight for Classic VB Developers ;ID=162041 Fast Track Visual Basic.NET ;ID=161990 Security for Microsoft Visual Basic.NET ;ID=175012 Visual Basic.NET How to Program 第二版 ;ID=173182 Visual Basic 2005 簡(jiǎn)明教程 ;ID=173180 Visual Basic 2005傻瓜書 ;ID=173178 Programming Visual Basic.NET ;ID=173164 Visual Basic .NET Tips and Techniques ;ID=176561 VB開發(fā)人員SQL Sever指南 ;ID=173176 How to Code .NET ;ID=145559 Essential .NET, Volume I ;ID=176152 ADO.NET全攻略 . 查看原帖
vb2010以后的版本就自帶Chart控件了,比如
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie '餅圖
。net ?其實(shí)還是很好繪制圖形的
你可以看下?Graphics ?類
Dim d As New Bitmap(Me.Width, Me.Height) ?‘一個(gè)圖片吧
? Dim g As Graphics = Graphics.FromImage(d)’繪制 ?準(zhǔn)備在這個(gè)圖片是進(jìn)行
然后 ?就是你繪制的東西了
線 就是 ??g.DrawLine()
圓 弧度 ?就用 ?g.DrawArc(Pens.Black, New Rectangle(0, 0, 400, 200), 0, 360)
復(fù)雜的就是 ? ? ?g.DrawBezier()
等 ?如果你用的是 VS的 ?編譯 ?上面都有詳細(xì)的參數(shù)說明
Dim?d?As?New?Bitmap(Me.Width,?Me.Height)
Dim?g?As?Graphics?=?Graphics.FromImage(d)
g.DrawArc(Pens.Black,?New?Rectangle(0,?0,?200,?200),?0,?360)
g.DrawLine(Pens.Red,?New?Point(0,?0),?New?Point(200,?200))
g.DrawLines(Pens.Green,?New?Point()?{New?Point(0,?0),?New?Point(50,?40),?New?Point(50,?80),?New?Point(90,?70),?New?Point(100,?400)})
g.DrawBezier(Pens.Yellow,?New?Point(0,?100),?New?Point(0,?0),?New?Point(200,?0),?New?Point(200,?200))
g.Dispose()
Me.BackgroundImage?=?d