网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

vb.net画多条曲线,vb实时曲线绘制

VB怎么用控件数组使一条线画出多条线?

Private Sub Command1_Click()

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:国际域名空间、虚拟主机、营销软件、网站建设、惠阳网站维护、网站推广。

Static n As Long

If n 5 Then

If n 0 Then Load Line1(n)

Line1(n).Visible = True

Line1(n).X1 = 1000

Line1(n).X2 = 5000

Line1(n).Y1 = 1000 + n * 1000

Line1(n).Y2 = 1000 + n * 1000

n = n + 1

End If

End Sub

Private Sub Command2_Click()

Static n As Long

If n 5 Then

If n 0 Then Load Line2(n)

Line2(n).Visible = True

Line2(n).X1 = 1000 + n * 1000

Line2(n).X2 = 1000 + n * 1000

Line2(n).Y1 = 5000

Line2(n).Y2 = 1000

n = n + 1

End If

End Sub

Private Sub Form_Load()

Line1(0).Visible = False

Line2(0).Visible = False

End Sub

如何在vb中绘制多条曲线

Private Sub Form_Load()

MSChart1.chartType = VtChChartType2dLine

Dim arrValues()

ReDim arrValues(1 To 5, 1 To 6)

Dim i As Integer

For i = 1 To 5

arrValues(i, 1) = "t" i 'x轴

arrValues(i, 2) = 0 + Rnd * 100 '第一条线

arrValues(i, 3) = 0 + Rnd * 100 '第二条线

arrValues(i, 4) = 0 + Rnd * 100 '第三条线

arrValues(i, 5) = 0 + Rnd * 100 '第四条线

arrValues(i, 6) = 0 + Rnd * 100 '第五条线

Next i

MSChart1.ChartData = arrValues

vb.net绘制曲线图

。net  其实还是很好绘制图形的

你可以看下 Graphics  类

Dim d As New Bitmap(Me.Width, Me.Height)  ‘一个图片吧

  Dim g As Graphics = Graphics.FromImage(d)’绘制  准备在这个图片是进行

然后  就是你绘制的东西了

线 就是   g.DrawLine()

圆 弧度  就用  g.DrawArc(Pens.Black, New Rectangle(0, 0, 400, 200), 0, 360)

复杂的就是      g.DrawBezier()

等  如果你用的是 VS的  编译  上面都有详细的参数说明

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画多条曲线,vb实时曲线绘制
链接地址:http://bjjierui.cn/article/heegis.html

其他资讯