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"
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 :(
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.