打印本文 打印本文 关闭窗口 关闭窗口
走近VB.Net(七)在窗体上画图
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1998  更新时间:2009/4/23 19:01:13  文章录入:mintao  责任编辑:mintao
               Dim newpen As New Pen(Color.Black, 5)

               gp.DrawBezier(newpen, 10, 20, 70, 80, 123, 233, 23, 45)

  End Sub

 

你也可以在一屏之内同时进行多次绘图,如下:

Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)

              Dim i As Integer

              Dim gp As Graphics = e.Graphics

              For i = 1 To 10

              Dim newpen As New Pen(color.FromARGB(i * 25, i * 25, i * 25), 5)

                    gp.DrawRectangle(newpen, 10 + i * 6, 20 + i * 6, 80, 80)

              Next

 End Sub

 运行一下,这个图片一定让你捧腹一笑,你可以随意改变参数看看有什么效果。

            

         VB.Net中文站网址:http://vbnetcn.126.com

 

        

         

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口