首頁>Club>
18
回覆列表
  • 1 # 小雪020

    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

  • 中秋節和大豐收的關聯?
  • 辯論賽中的價值怎麼分高下?