Use a Picturebox it'll yield better results, eg.
Code:
Private oX As Integer
Private oY As Integer
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
oX = ScaleX(X, ScaleMode, vbPixels)
oY = ScaleY(Y, ScaleMode, vbPixels)
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static lX As Single
Static lY As Single
If lX = X And lY = Y Then Exit Sub
lX = X
lY = Y
If Button = vbLeftButton Then
X = X - ScaleX(oX, vbPixels, ScaleMode)
Y = Y - ScaleY(oY, vbPixels, ScaleMode)
Picture1.Move X + Picture1.Left, Y + Picture1.Top
End If
End Sub
Just Click on the Picture and Drag...
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]