views:

722

answers:

2

Hi! I have a Circle and a Line control. Circle control's OnPaint draws a circle and Line control's one draws a line. These two controls are contained in another control (DrawingControl). I need to put a Line over a Circle, but Circle's background deletes the Line. I tried enabling transparency and overriding Circle's OnPaintBackground method, but it doesn't seem to work. Do you have any ideas? Thanks.

+2  A: 

Does this tutorial help? It consists of three steps: Enabling transparency, overriding OnPaintBackground and overriding OnMove

schnaader
It was perfect! Thank you so much.
loris_p
A: 

See this answer about creating a diagonal-line control. This technique does not require using transparency, but instead uses an irregularly-shaped region. Creating a circle control this way would be a little more complicated than the line example, since you'll need to use bezier curves instead of line segments in order to create a smooth circle.

MusiGenesis