vb.net画图数组 vb数组

如何用VB.NET调用excel的画图命令,即用.NET得到一组点坐标后,调用excel根据点画出曲线图并显示在VB.NET里

你可以通过用VB.net控制excel,让excel生成曲线图,然后利用excelVBA将图输出,最后导入到VB.net就可以了。

成都创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站设计、网站制作、沐川网络推广、小程序开发、沐川网络营销、沐川企业策划、沐川品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联公司为所有大学生创业者提供沐川建站搭建服务,24小时服务热线:028-86922220,官方网址:www.cdcxhl.com

VB.net中如何画图?

VB.net与VB不同。

VB.net已经有专门绘图的类。

可以定义笔刷然后用Drawing类中的方法绘制。

Private Sub DrawEllipse()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawEllipse(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

Private Sub DrawRectangle()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawRectangle(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

vb.net 如何动态添加picturebox 控件数组(在不知道图片大小的情况下)

Dim PictureBox11(1) as PictureBox ‘放在最前面

Dim i as integer

Form_load 设i=0

动态添加:

if ipicturebox11.ubound then load(picturebox11(i))

picturebox11(i).loadpicture("图片地址")

Picture11(i).PaintPicture Picture11(i).Picture, 0, 0, Picture11(i).Width, Picture11(i).Height

picturebox11(i).visible=true

i=i+1

动态删除

i=i-1

unload picturebox11(i)

vb.net 画二维数组的曲线图

Private Sub PictureBox2_Paint(sender As Object, e As PaintEventArgs) Handles PictureBox2.Paint

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可设为全局变量,那样add随便在哪增加,想要看见看上去动态的图,那就在新增完n个后,继续增加n+1个之时,放弃points中的第一个。


本文名称:vb.net画图数组 vb数组
转载来源:http://myzitong.com/article/hhejsh.html