0

While I know that this might have been answered before, but none of them actually told me how to prevent PictureBoxes from overlapping without drawing them to the form or something else.

So, how do I prevent PictureBoxes from overlapping when placed over another?

What it should look like:

https://i.stack.imgur.com/FKakp.png

What it actually looks like:

https://i.stack.imgur.com/8aT2E.png

If you need to know for whatever reason, the PictureBoxes are 32x32, map PictureBoxes are called "PictureBox(1-64)" and the player one is called "PicPlayer".

Also if I set the order of the PicPlayer to the back then that won't display at all!

Perska
  • 5
  • 4
  • Isn't that because PicPlayer needs to redraw. Can't you call .Refresh() on PicPlayer? I'm probably barking up the wrong tree – Malcor Nov 17 '15 at 17:38
  • @Malcor No because the transparency is sort of fake. I don't remember why it was like that right now. – Perska Nov 17 '15 at 17:44
  • PB displays its Parent as the background. It can have only one parent. Simple workaround is to not use PB, you can just easily use Graphics.DrawImage(). – Hans Passant Nov 17 '15 at 17:50
  • @HansPassant And how do I exactly use it? – Perska Nov 17 '15 at 17:54
  • Possible duplicate of [Make Picture boxes transparent, each overlapping the other with a corner?](http://stackoverflow.com/questions/36710701/make-picture-boxes-transparent-each-overlapping-the-other-with-a-corner) – Zohar Peled Jan 19 '17 at 09:42

0 Answers0