Drawings in front of an image

M

Marcelo

Greetings!
I'm developing a multiple forms application in Microsoft Visual Studio
C++ .NET 2003. I have a problems with graphics: I draw my diagrams in a
pictureBox using its paint event and using the Invalidate() function to
call it. It works very well.
What I need now is drawing (for example) a rectangle over this image
(the diagrams) and afterwards (with a click button, for example) erase
it again. But my diagrams in the background must continue there. I'd
thank very much for any idea of how I could do that.
 
G

Guest

If I'm not mistaken, this should be handled in the same paint event that you
are already using to draw your diagrams. After the diagrams have been drawn,
depending on the state of the application, you either draw your rectangle(s)
or you don't. That is probably how I would do it
 
M

Marcelo

Ok, thank you, you are right!
I hadn't realyzed. I just need to work with some 'if' clauses.
 

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