03-11-19, 03:09 PM
السلام عليكم ورحمة الله وبركاته
مشروعك لم يعمل لدي لكن الي فهمته هذا طلبك
مشروعك لم يعمل لدي لكن الي فهمته هذا طلبك
كود :
Dim M As Boolean = False
Dim x, y As Integer
Private Sub PictureBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseDown, PictureBox2.MouseDown, PictureBox4.MouseDown
M = True
sender.BringToFront()
x = e.X : y = e.Y
End Sub
Private Sub PictureBox_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseMove, PictureBox2.MouseMove, PictureBox4.MouseMove
If M Then
sender.location = New Point(sender.location.x + e.X - x, sender.location.y + e.Y - y)
End If
End Sub
Private Sub PictureBox_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseUp, PictureBox2.MouseUp, PictureBox4.MouseUp
M = False
End Sub
