I am writing some source code, that I am required to have two graphic pictureboxes at two different mouse positons. And they are: X and Y.

Here is my source code, which only has the problem in it:
Code:
Public Sub BackGround1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    If (Y < 0) Or (Y > ScaleHeight) Then
    If (X < 0) Or (X > ScaleWidth) Then
        If GetCapture() Then ReleaseCapture
      Else
        If Not GetCapture() Then SetCapture Me.hwnd
        Form11.TopCursor1.Move Y
        Form11.LeftCursor1.Move X
    End If
    End If

End Sub