I have a form on which is a frame in in that is an image. On this image I have drawn a number of labels (a cross and some text). I would also like to draw some horizontal & vertical lines. I think I draw these using rectangles with width/height of 1.
The code to draw the labels is:
Can you suggest similar code to draw a rectangle?
Thank you
The code to draw the labels is:
Code:
Private Sub SetLabel(MyFrame As Frame, Mytop As Single, MyLeft As Single, MyCaption As String)
Dim lblBox_n As Object
Set lblBox_n = MyFrame.Controls.Add("Forms.Label.1", "lblBox_n", True)
With lblBox_n
.top = Mytop
.left = MyLeft
.caption = MyCaption
.height = 8
.width = 28
.TextAlign = 1 ' left
.ForeColor = vbRed
.AutoSize = True
End With
End Sub
Thank you