0
I have a picturebox and I make his movement only to the right and left, but I would like that when the end of the image reaches the edge of the form and the beginning, it is no longer possible to move it.
This way:
I’d like it to stay this way:
Follows the scrpit used:
private void imagemPictureBox_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button==MouseButtons.Left)
{
x = e.X;
}
}
private void imagemPictureBox_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
imagemPictureBox.Left += (e.X - x);
}
}
I’ll analyze and try some research.
– rysahara