简体   繁体   中英

VB.NET: PictureBox view range?

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 :(

看一下这些线程是否可以帮助您: 1 2

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM