-
When I'm dragging a pictur box, it shows me the contents of the picture only after I'm dragging about 25% of the whole picture box. I want the dragging to show it dragged "PIXEL AFTER PIXEL".
Please Help My DUMB Brain.!!!!!!!!!!!!!!!!!
I'm trying to solve it for a month!!!
:confused: :confused:
-
Try this:
Put a picture box on your form:
Private sngMouseX As Single
Private sngMouseY As Single
Private blnIsDragging As Boolean
Private Sub picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button And vbLeftButton Then
If blnIsDragging = False Then
blnIsDragging = True
sngMouseX = X
sngMouseY = Y
End If
End If
End Sub
Private Sub picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If blnIsDragging Then
With Picture1
.Move .Left + X - sngMouseX, .Top + Y - sngMouseY
End With
End If
End Sub
Private Sub picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button And vbLeftButton Then
blnIsDragging = False
End If
End Sub
-
Thanks
Thanks Man!!!!
It really worked!
You dont know how much you helped me!
I really appriciate this.
THANKS!!!