VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



It is an easy way to draw a rectangle with a simple code.

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.

Rate 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


Download this snippet    Add to My Saved Code

It is an easy way to draw a rectangle with a simple code. Comments

No comments have been posted about It is an easy way to draw a rectangle with a simple code.. Why not be the first to post a comment about It is an easy way to draw a rectangle with a simple code..

Post your comment

Subject:
Message:
0/1000 characters