成都网站建设设计

将想法与焦点和您一起共享

vb.net绘制多段线 vb怎么实现多线程

谁能提供一段vb在CAD中绘制多段线的实例代码作参考!

多线段没画过,

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

线倒是画过,二话不说直接上代码你参考一下

绘制边框

Private Sub Command4_Click()

Set acadDoc = acadApp.ActiveDocument

link2

acadDoc.ActiveLayer = acadlay(0)

With adoRes

While Not .EOF

pt1(0) = !X: pt1(1) = !Y: pt1(2) = !z: pt2(0) = !X1: pt2(1) = !Y1: pt2(2) = !z1

draw pt1, pt2

.MoveNext

Wend

End With

pt1(0) = 0: pt1(1) = 0: pt1(2) = 0

pt2(0) = 20: pt2(1) = 10: pt2(2) = 0

draw pt1, pt2

'在坡

pt1(0) = 0: pt1(1) = 0: pt1(2) = 0

pt2(0) = 20: pt2(1) = 10: pt2(2) = 0

draw pt1, pt2

For c = 0 To 50 Step 10

pt1(0) = 0: pt1(1) = c: pt1(2) = 0

pt2(0) = 270: pt2(1) = c: pt2(2) = 0

draw pt1, pt2

Next c

pt1(0) = 20: pt1(1) = 0: pt1(2) = 0

pt2(0) = 20: pt2(1) = 190: pt2(2) = 0

draw pt1, pt2

pt1(0) = 0: pt1(1) = 0: pt1(2) = 0

pt2(0) = 0: pt2(1) = -10: pt2(2) = 0

draw pt1, pt2

pt1(0) = 0: pt1(1) = -10: pt1(2) = 0

pt2(0) = 270: pt2(1) = -10: pt2(2) = 0

draw pt1, pt2

pt1(0) = 270: pt1(1) = -10: pt1(2) = 0

pt2(0) = 270: pt2(1) = 0: pt2(2) = 0

draw pt1, pt2

pt3(0) = 5: pt3(1) = -7

acadDoc.ModelSpace.AddText t, pt3, 4

pt3(0) = 55: pt3(1) = -7

acadDoc.ModelSpace.AddText t1, pt3, 4

a = 0

For c = 60 To 100 Step 10

pt1(0) = 20: pt1(1) = c: pt1(2) = 0

pt2(0) = 23: pt2(1) = c: pt2(2) = 0

draw pt1, pt2

pt1(0) = 10: pt1(1) = c - 1.6: pt1(2) = 0

acadDoc.ModelSpace.AddText a, pt1, 3.2

a = a + 2

Next c

'在图中加入地面高程

acadDoc.ActiveTextStyle = acadDoc.TextStyles.Add("楷体")

pt1(0) = 1: pt1(1) = 13: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("地面高程", pt1, 3.2)

Call rote1(acadtext, pt1)

'在图中加入设计高程

Call rote1(acadtext, pt1)

pt1(0) = 1: pt1(1) = 23: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("设计高程", pt1, 3.2)

Call rote1(acadtext, pt1)

'在图中加入填挖高

pt1(0) = 1: pt1(1) = 33: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("填 挖 高", pt1, 3.2)

Call rote1(acadtext, pt1)

'在图中加入坡度/坡长

pt1(0) = 0: pt1(1) = 5.5: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("坡 度", pt1, 3.2)

Call rote1(acadtext, pt1)

pt1(0) = 9: pt1(1) = 1: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("坡 长", pt1, 3.2)

Call rote1(acadtext, pt1)

'在图中加入桩号

pt1(0) = 1: pt1(1) = 43: pt1(2) = 0

Set acadtext = acadDoc.ModelSpace.AddText("桩 号", pt1, 3.2)

Call rote1(acadtext, pt1)

Call Command5_Click

End Sub

Private Sub draw(pt1, pt2)

Set AcadLine = acadDoc.ModelSpace.AddLine(pt1, pt2)

acadDoc.Regen acActiveViewport

End Sub

线倒是画过,二话不说直接上代码你参考一下

VB.net中如何在picturebox画线,有什么函数?

Dim b As New Bitmap(PictureBox1.Width, PictureBox1.Height)

Dim g As Graphics = Graphics.FromImage(b)

g.Clear(Color.White)

Dim p As New Pen(Color.Black)

p.EndCap = Drawing2D.LineCap.ArrowAnchor

g.DrawLine(p, 30, PictureBox1.Height - 30, 30, 30)

g.DrawLine(p, 30, PictureBox1.Height - 30, PictureBox1.Width - 30, PictureBox1.Height - 30)

Dim i As Integer

Dim bs As New SolidBrush(Color.Green)

Dim po As New Point

po.X = 0

po.Y = PictureBox1.Height - 35

For i = 700 To 1000 Step 50

g.DrawString(i, Me.Font, bs, po.X, po.Y)

g.DrawLine(p, po.X + 28, po.Y + 5, po.X + 30, po.Y + 5)

po.Y -= (PictureBox1.Height - 100) / 6

Next

po.X = 30

po.Y = PictureBox1.Height - 30

For i = 0 To 40 Step 5

g.DrawString(i, Me.Font, bs, po.X, po.Y + 5)

g.DrawLine(p, po.X, po.Y + 2, po.X, po.Y)

po.X += (PictureBox1.Width - 100) / 8

Next

PictureBox1.Image = b

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

请问在VB6中该如何画多条曲线呢

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绘制多段线 vb怎么实现多线程
标题URL:http://chengdu.cdxwcx.cn/article/dogpgso.html