我正在尝试通过单击一个按钮来绘制一个矩形,但是就像我认为的那样简单,我无法做到正确。
Private Sub Button36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36.Click
' Create pen.
Dim blackPen As New Pen(Color.Black, 1)
' Create rectangle.
Dim rect As New Rectangle(10, 710, 35, 100)
' Draw rectangle to screen.
Me.CreateGraphics.DrawRectangle(blackPen, rect)
End Sub
我正在使用 VB.NET