vb.net數(shù)據(jù)庫(kù)曲線 vb怎么根據(jù)數(shù)據(jù)繪制曲線

vb.net繪制曲線圖

。net ?其實(shí)還是很好繪制圖形的

網(wǎng)站建設(shè)哪家好,找創(chuàng)新互聯(lián)!專注于網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了玉泉街道免費(fèi)建站歡迎大家使用!

你可以看下?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

vb.net+Access數(shù)據(jù)庫(kù),按時(shí)繪制一天的數(shù)據(jù)的曲線,即24小時(shí)趨勢(shì)曲線

1、2,有多少數(shù)據(jù)就畫多少曲線,前或后沒有就斷開唄,前后都沒有就畫橫線。

3,數(shù)據(jù)庫(kù)按時(shí)間排序,選出最新時(shí)間值,然后根據(jù)這個(gè)值

,通過類似 select * from table where date#2010-8-20# and date#2007-8-23# 這樣的語句選出往前兩天的數(shù)據(jù)。

VB.NET 實(shí)時(shí)曲線

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

想在VB中根據(jù)數(shù)據(jù)庫(kù)的數(shù)據(jù)畫曲線變化圖,如何畫?用什么方法

VB提供的繪制圖形的方法:(可以在窗體上或PicTureBox控件上使用)

與你主題相關(guān)的有:

1,繪制直線

object.Line (x1,y1) - (x2,y2), [color]

其中:(x1,y1) 和 (x2,y2)分別是平面上的兩個(gè)點(diǎn)坐標(biāo)。

2,繪制一點(diǎn):

object.PSet (x,y), [color]

其中:(x1,y1) 是平面上的一個(gè)點(diǎn)坐標(biāo)。

3,繪制圖形的筆尖的粗細(xì):

object.DrawWidth = size

默認(rèn)粗細(xì)為1。

4,繪制圖形的線條的顏色設(shè)置:

1)Object.ForeColor = QbColor(n) :n = 0 -- 15

2) 或者在使用上述方法時(shí),在后邊跟的參數(shù)[color]

思路:

繪制曲線,就是根據(jù)函數(shù)關(guān)系:y = f(x),采用描點(diǎn)法,在某一區(qū)域范圍內(nèi),根據(jù)x計(jì)算y,然后用

PSet (x,y)實(shí)現(xiàn)曲線的繪制。

網(wǎng)頁(yè)名稱:vb.net數(shù)據(jù)庫(kù)曲線 vb怎么根據(jù)數(shù)據(jù)繪制曲線
文章分享:http://muchs.cn/article20/dospjjo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、響應(yīng)式網(wǎng)站、外貿(mào)建站、網(wǎng)站收錄、小程序開發(fā)、App設(shè)計(jì)

廣告

聲明:本網(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)

成都網(wǎng)頁(yè)設(shè)計(jì)公司