transparent pictureboxes in C#
-
language: C# I am trying to set a no. of pictureboxes containing an image( image being a transparent image) of its own. Is there any way to set these pictureboxes over one another so that the image of one picturebox below another picturebox can be seen( as the images set over them are transparent)????
-
language: C# I am trying to set a no. of pictureboxes containing an image( image being a transparent image) of its own. Is there any way to set these pictureboxes over one another so that the image of one picturebox below another picturebox can be seen( as the images set over them are transparent)????
You can't do this with pictureBoxes - even though the image contains transparent areas, the pictureBox will only show the background colour of the parent control (or anything you paint manually in the PaintBackground event of parent control). You may have better luck doing the painting yourself rather than relying on pictureBox - this will give you more control over what happens when you layer images like this.
"An eye for an eye only ends up making the whole world blind"
-
language: C# I am trying to set a no. of pictureboxes containing an image( image being a transparent image) of its own. Is there any way to set these pictureboxes over one another so that the image of one picturebox below another picturebox can be seen( as the images set over them are transparent)????
I agree with the previous poster, It would be better to have a list of images in your form and to draw them all to a single picture box inside the PictureBox Paint event handler.
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
language: C# I am trying to set a no. of pictureboxes containing an image( image being a transparent image) of its own. Is there any way to set these pictureboxes over one another so that the image of one picturebox below another picturebox can be seen( as the images set over them are transparent)????
The best thing you can do is layer these images in memory, and then write the combined image into a single picturebox.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
language: C# I am trying to set a no. of pictureboxes containing an image( image being a transparent image) of its own. Is there any way to set these pictureboxes over one another so that the image of one picturebox below another picturebox can be seen( as the images set over them are transparent)????
Hi, if you want to operate on images and don't know how to do it with a PictureBox, then it is very likely a PictureBox is not the right Control for the job. Consider using a Panel, and paint whatever it is you need in its Paint handler. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Fixturized forever. :confused:
-
Hi, if you want to operate on images and don't know how to do it with a PictureBox, then it is very likely a PictureBox is not the right Control for the job. Consider using a Panel, and paint whatever it is you need in its Paint handler. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Fixturized forever. :confused:
-
can a panel open multiple images together.... if not then how to do it.. as i have more than 1 no. of transparent images to open :confused:??? if yes.... then i'll go forward with it..... Thank you all for replying.... ;)
A Panel is a simple container, it is like a whiteboard with size, location, backcolor, etc. but it does not do anything; you have to load the images yourself and paint what you want to see. IMO Panel gets sufficiently explained in MSDN. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Fixturized forever. :confused: