Moving Pictureboxs over each other (Transparency)

  • Thread starter Thread starter toby
  • Start date Start date
T

toby

Hi,

After the great help I received to create PictureBox arrays I now have
another problem.

I want to be able to position transparent pictureboxes (with a small
rectangle drawn in them) next to each other. However if they overlap
they do obsure the picturebox underneath, even though the form
background is still visible.

I have drawn the rectangle on using the FillRectangle graphics to draw
on an image object, then copied that to the picturebox.

Any ideas how to get the pictureboxes transparent but not obscure the
ones below it?

Toby.
 
Hi,

After the great help I received to create PictureBox arrays I now have
another problem.

I want to be able to position transparent pictureboxes (with a small
rectangle drawn in them) next to each other. However if they overlap
they do obsure the picturebox underneath, even though the form
background is still visible.

I have drawn the rectangle on using the FillRectangle graphics to draw
on an image object, then copied that to the picturebox.

Any ideas how to get the pictureboxes transparent but not obscure the
ones below it?

Toby.

Try setting the BackColour property to Transparent. Also, do your
images have transparency in them?
 
Try setting the BackColour property to Transparent. Also, do your
images have transparency in them?

The backColour property is set to that. There are no images int he
pictureboxes apart from the drawn rectangles. The picturebox is 25x25
and the rectangle is 10x10 (so you can see around the edge).

The pictureboxes that move are designed at run-time and added to the
PictureBox1 object collection, so you can see PictureBox1 image through
the small pictureboxes, but not a small picturebox through another
small picturebox (does that make sense?).

Toby.
 
Back
Top