Hello,
Ive to draw a line on a picture i used this code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
x1 = z.X
y1 = z.Y
lbl3 = "x1: " & x1
lbl4 = "y1: " & y1
With Line1
.Visible = True
.x1 = X
.y1 = Y
.x2 = X
.y2 = Y
Drawing = True
End With
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Drawing Then
With Line1
.x2 = X
.y2 = Y
End With
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As
Single, Y As Single)
x2 = z.X
y2 = z.Y
lbl5 = "x2: " & x2
lbl6 = "y2: " & y2
Drawing = False
With Line1
Me.Line (.x1, .y1)-(.x2, .y2)
.Visible = False
End With
End Sub
But i doesnt draw on the picture, only on the form??/
Can someone help me with this??
Thx in advance
Dennis