19-11-14, 04:56 PM
السلام عليكم ورحمة الله وبركاته
كود تحريك الصورة
كود تحريك الصورة
PHP كود :
Private Sub PictureBox_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
Static mousePosX As Single, mousePosY As Single
If e.Button = 0 Then
mousePosX = e.X
mousePosY = e.Y
Else
PictureBox1.Left = PictureBox1.Left + (e.X - mousePosX)
PictureBox1.Top = PictureBox1.Top + (e.Y - mousePosY)
End If
End Sub

