Hi! I have a large panel with lots of pictureBoxes inside it. Is it possible to draw on these pictureboxes by drawing on the panel?
What i want is that the actual drawing is on top of the panel.
Is this possible to do, if so, how?
Thanks in advance
Hi! I have a large panel with lots of pictureBoxes inside it. Is it possible to draw on these pictureboxes by drawing on the panel?
What i want is that the actual drawing is on top of the panel.
Is this possible to do, if so, how?
Thanks in advance
You cannot do that if the pictureBoxes are inside the panel, what you may try is adding another panel inside it, above the pictures and drawing in that one. (Not sure if this would work either)
I would suggest rethinking this idea and drawing the pictures directly onto the panel. Then afterwards you could do the actual drawing that you require. You could create a custom class MyPanel or whatever, and inherit from Panel. Then override OnPaint and do all your drawing in there.
The only other way is to draw directly to the screen using link text.
You can't draw on child controls in the parents OnPaint method, what you can do is hook into the OnPaintevent of every child control.
I would not recommend this however, I think it's better to create your own control which manages all the bitmaps.