How can I do the same thing with other shaped like rectangle?
I know that I need x,y,widht,height but it still don't do my rec. Any ideas?

How can I do the same thing with other shaped like rectangle?
I know that I need x,y,widht,height but it still don't do my rec. Any ideas?

Handle the Paint event of Form object.

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.DrawRectangle(Pens.Red, 30, 30, 100, 100)
    End Sub