Moving Pictureboxs over each other (Transparency)

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.
 
L

lord.zoltar

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?
 
T

toby

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top