본문 바로가기
Programing/vb.net

비쥬얼베이직(비주얼베이직)visual basic,vb.net 강좌-사각형그리기.graphics,SolidBrush,FillRectangle

by 고니의 경제주식 2017. 1. 18.
반응형

vb.net 강좌-사각형그리기.graphics



Public Class Form1

    Dim gr As Graphics

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        gr = Me.CreateGraphics

    End Sub



    Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint


        Dim c As Color = Color.DarkOrange


        Dim p As New SolidBrush(c)


        gr.FillRectangle(p, 50, 50, 150, 250)

    End Sub

End Class



반응형