vbnetk线图的简单介绍

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实现k线图,最好不是用控件的在picturebox控件中使用画图得语句
Picture1.Line (x1,y1)-(x2,y2), QBColor(2)
QBColor(2)代表颜色,可以修改
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)
【vbnetk线图的简单介绍】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画K线图的例子吗我说一个例子
ctrl+t引用 D:\WIN2K\System32\MSCHRT20.OCX **部件**
Private Sub Command1_Click()
With MSChart1
.chartType = VtChChartType2dLine
.ColumnCount = 8
.RowCount = 8
.ShowLegend = True
.SelectPart VtChPartTypePlot, index1, index2, _
index3, index4
.EditCopy
.SelectPart VtChPartTypeLegend, index1, _
index2, index3, index4
.EditPaste
End With
End Sub
vbnetk线图的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于、vbnetk线图的信息别忘了在本站进行查找喔 。

    推荐阅读