2

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.

loris_p
  • 75
  • 6

2 Answers2

2

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

schnaader
  • 49,103
  • 10
  • 104
  • 136
0

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.

Community
  • 1
  • 1
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334