2

I two pictureboxes in my application: One that is mostly just a background image, and another which you can move around changing some settings.

However, depending on my settings (X,Y,Width,Height), a fragment or all of the second picturebox might be "out" of the first picturebox. I don't want that.

Basically, if there is anything in the second picturebox's that is not over the first picturebox, I don't want to show that fragment. I want to cut it.

If I move the second picturebox back inside the first picturebox, then I can see all of it again.

Think of the first picturebox as a "view range"

Saturn
  • 17,888
  • 49
  • 145
  • 271

2 Answers2

0

Fixed:

I set the second picturebox's parent to the first picturebox. Now the second picturebox is cut if it leaves the first picturebox's area.

Sorry for wasting your time :(

Saturn
  • 17,888
  • 49
  • 145
  • 271
0

Take a look if these threads can help : 1 2

Community
  • 1
  • 1
user44298
  • 910
  • 7
  • 20