拖一個(gè)PictureBox1控件 創(chuàng)建一個(gè)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 得到數(shù)據(jù)后,改point的數(shù)據(jù)。然后PictureBox1.Refresh()就行了

創(chuàng)新互聯(lián)專注于遠(yuǎn)安網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供遠(yuǎn)安營(yíng)銷型網(wǎng)站建設(shè),遠(yuǎn)安網(wǎng)站制作、遠(yuǎn)安網(wǎng)頁(yè)設(shè)計(jì)、遠(yuǎn)安網(wǎng)站官網(wǎng)定制、小程序定制開發(fā)服務(wù),打造遠(yuǎn)安網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供遠(yuǎn)安網(wǎng)站排名全網(wǎng)營(yíng)銷落地服務(wù)。
首先你要建一個(gè) Bitmap
再將picture控件的image屬性與之相關(guān)聯(lián)
再到 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")
/////////////////////////////////////
存成的文件絕對(duì)有你畫的線..我一直在用這種方法
vb2010以后的版本就自帶Chart控件了,比如
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie '餅圖
網(wǎng)站名稱:vb.net曲線控件,vb畫函數(shù)曲線
標(biāo)題鏈接:http://chinadenli.net/article3/dsgoeos.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司、域名注冊(cè)、定制網(wǎng)站、響應(yīng)式網(wǎng)站、網(wǎng)站策劃、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)