对代码对话框中删除所有原有代码,再把下面的代码复制进去即可。
Dim X1, Y1 As Integer
Dim Down As Boolean
Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Not Down Then
X1 = X
Y1 = Y
Down = True
End If
End Sub
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Down Then
Image1.Left = Image1.Left + X - X1
Image1.Top = Image1.Top + Y - Y1
X1 = X
Y1 = Y
End If
End Sub
Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Down = False
SlideShowWindows(1).View.First
End Sub
Private Sub Image1_Click()
End Sub
Private Sub Image1_BeforeDragOver(ByVal Cancel As MSForms.ReturnBoolean, ByVal Data As MSForms.DataObject, ByVal X As Single, ByVal Y As Single, ByVal DragState As MSForms.fmDragState, ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
End Sub