杭州考科目四怎么预约:VB.net中如何画图?

来源:百度文库 编辑:高校问答 时间:2024/04/28 13:29:55
VB6中的form1.circle (100,200),rgb(0,255,0)的语句如何在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

wq 你有这个软件啊,能不能发到我的邮箱里面啊,我们要作业

不会,谁回谁答