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.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Does this tutorial help? It consists of three steps: Enabling transparency, overriding OnPaintBackground and overriding OnMove
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.