1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Dim w
Dim h
Dim l
Dim t
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
With Image1: .Move l, t, w, h: End With
End Sub
Private Sub UserForm_Activate()
With Image1
.Tag = .Left & ":" & .Top & ":" & .Width & ":" & .Height
w = .Width * 2: h = .Height * 2: l = .Left - (.Width / 2): t = .Top - (.Height / 2): End With
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
With Image1: dims = Split(.Tag, ":"): .Move dims(0), dims(1), dims(2), dims(3): End With
End Sub |
Partager