vb.net绘图实例的简单介绍

如何使用vb.net调用cad进行绘图

你去查查书吧,书上挺详细的,在这说不好说,你先在项目里引用。然后 Dim acadapp As AcadApplication Dim acaddoc As AcadDocument On Error Resume Next AcadApp = GetObject(, "AutoCAD.Application") If Err.Number Then Err.Clear() AcadApp = CreateObject("AutoCAD.Application") If Err.Number Then MsgBox("不能运行AutoCAD,请检查是否安装了AutoCAD") Exit Sub End If End If AcadApp.Visible = True '界面可视

目前创新互联建站已为上1000+的企业提供了网站建设、域名、网页空间、网站托管、服务器托管、企业网站设计、永济网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

请问vb中的 PaintPicture在vb.net中代码是什么。最好有实例

获取控件的Graphic对象,绘图方法都集中在了该对像中了。

1. 通过控件GreateGrapic方法获得

2. Paint 事件参数e中也有此对象

相应的图形方法是DrawImage,vb.net中没有自动重绘功能,图形不是持久的,所以应当在Paint事件中绘图。

Private Sub PictureBox2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox2.Paint

e.Graphics.SetClip(e.ClipRectangle)

e.Graphics.DrawImage(PictureBox1.Image, New Rectangle(0, 0, PictureBox1.ClientSize.Width, PictureBox1.ClientSize.Height), New Rectangle(5, 5, 100, 100), GraphicsUnit.Pixel)

End Sub

怎么利用VB.NET实现三维绘图

数学上不是有斜二测画法,算好坐标即可画出

或者用AnyCAD的.Net图形控件

也可以调用matlab 实现

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绘制曲线图

。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绘图实例的简单介绍
当前网址:http://ybzwz.com/article/hpopgs.html