如何完成picture控件上的图片拖放到窗体的任意位置呀?
我现在做毕设,要用VB设计个界面,完成用鼠标将picturebox控件上的图片拖放到窗体的任意位置,效果是图片的移动和复制!哪位大侠可以帮助小女子一下呀!很着急!
Private x1, y1 As Long
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
x1 = X
y1 = Y
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Left = Picture1.Left + (X - x1)
Picture1.Top = Picture1.Top + (Y - y1)
End Sub