Layering in PictureBox[2003]
I am creating an Image processing Application in which 3 or 4 Images are superimposed one over the other. I am using DrawImage function for displaying the images.
I want to select the Images using Layer concept and change it properties such as fillcolor, size etc. and use sendtoback/bringtofront for each objects.
Consider a Triangle, Square and a Circle Images painted one over the other.
I need to select the square and change its property or may need to send it back / front.
Thanks in advance.
[530 byte] By [
madhu_j] at [2007-11-20 11:49:26]

# 1 Re: Layering in PictureBox[2003]
GDI+ drawings are not objects, so there's no concept of selecting an object and bringing it to the front. Each time the control gets painted your drawings are performed, laid down one on top of the other. The first drawing you do is on the bottom and the last on the top. If you want to change that then you have to change the order in which you draw them and then force a repaint. You would probably maintain a collection of objects where each object contain the data for a drawing. Each time you painted the control you'd loop through that collection. To change the order you would reorder the collection and then force a repaint.