by Ali Atiq (5 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
It is an easy way to draw a rectangle with a simple code.
'
'
'*****************************************
'Auther: Ali Atiq.
'Date: 29/10/2002
'Any comments please email me on
' [email protected]
'
'*******************************************
Option Explicit
Private Function DrawRect(Objct As Object, X As Long, Y As Long, Ht As Long, Wid As Long)
Objct.Line (X, Y)-(X + Wid, Y)
Objct.Line (X, Y + Ht)-(X + Wid, Y + Ht)
Objct.Line (X, Y)-(X, Y + Ht)
Objct.Line (X + Wid, Y)-(X + Wid, Y + Ht)
End Function
Private Sub Form_Click()
Me.AutoRedraw = -1
DrawRect Me, 500, 500, 500, 1000
End Sub