i have made some code to create a line and set one end of it to the curunt
cursor location:
the problem is that when i releese the mouse button i want to draw the other end of the line.Code:Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) i = X p = Y a = a + 1 c = "g" & (a) Set c = Controls.Add("VB.line", (c)) c.Visible = True c.X1 = i c.Y1 = p
but when i say
an error comes up that says : "object required"Code:Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) c.X2 = i c.Y2 = p End Sub
i know this is probebly a simple question but just can't figure it out!
thanx
mr smither




Reply With Quote