Dim X1, X2, X3, X4, X5, X6 As Integer, Y1, Y2, Y3, Y4, Y5, Y6 As Integer, 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
X4 = X
Y4 = 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 - X4
Image1.Top = Image1.Top + Y - Y4
X4 = X
Y4 = 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
QUOTE:
flash 效果挺好的我的代码是:
Dim X1, X2, X3, X4, X5, X6 As Integer, Y1, Y2, Y3, Y4, Y5, Y6 As Integer, 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
X4 = X
Y4 = 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 - X4
Image1.Top = Image1.Top + Y - Y4
X4 = X
Y4 = 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
看看先