Hi chaps me again !!!
im trying to draw a line around the edge of a picture box
my code seems fine it doesnt gereate any errors but i dont get a line either can someone check my math is right ??
ps i have tried setting the scalemodes to pixel as well as twipsperpixel
this example is in twips where 6 twips = pixel
VB Code:
Private Sub Form_Load() frm1.ScaleMode = 1 pic1.ScaleMode = 1 drawbox End Sub Public Sub drawbox() Dim LTop As Integer Dim LBottom As Integer Dim Lleft As Integer Dim LRight As Integer pic1.Cls LTop = pic1.Top + 6 LBottom = pic1.Top + pic1.Height - 6 Lleft = pic1.Left + 6 LRight = pic1.Left + pic1.Width - 6 pic1.DrawWidth = 6 pic1.Line (Lleft, LBottom)-(LRight, LBottom), RGB(127, 157, 185) pic1.Line (LRight, LBottom)-(LRight, LTop), RGB(127, 157, 185) End Sub
any Ideas people??




Reply With Quote