Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim I As Long
If Button = vbKeyLButton Then
For I = 0 To 3
If Abs(X - Ps(I).X) <= RectX And Abs(Y - Ps(I).Y) < RectY Then
StepX = X - Ps(I).X
StepY = Y - Ps(I).Y
MoveP = I
Exit For
End If
Next I
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim I As Long
If Button = 0 Then
For I = 0 To 3
If Abs(X - Ps(I).X) <= RectX And Abs(Y - Ps(I).Y) < RectY Then
Me.MousePointer = vbCrosshair
Exit Sub
End If
Next I
Me.MousePointer = vbDefault
End If
If MoveP >= 0 And MoveP <= 3 Then
Ps(MoveP).X = X - StepX
Ps(MoveP).Y = Y - StepY
DrawLX
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MoveP = -1
End Sub