- Код: Выделить всё
Dim Xb As Single
Dim Yb As Single
Dim L As Single
Dim T As Single
Dim Flag As Boolean
Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Flag = True
Image1.BorderColor = RGB(0, 0, 255)
L = Image1.Left
T = Image1.Top
Xb = X
Yb = Y
End Sub
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Flag = True Then
Image1.Left = X - (Xb - L)
Image1.Top = Y - (Yb - T)
End If
End Sub
Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Flag = False
Image1.BorderColor = RGB(0, 0, 0)
End Sub
Но всё жутко тормозит. Нужно именно чтобы при перетаскивании отображалась картинка в Image1. Заранее блогадарен за любую помощь