如何重叠的两个控制 [英] How to overlap two controls
问题描述
我有一个圆和线路控制。 圆形控制的OnPaint中绘制一个圆和直线控制的一个提请线。这两个控件都包含在另一个控制(DrawingControl)。 我需要把一个行过圆,但圆的背景删除线。我试图使透明度和覆盖圈的OnPaintBackground方法,但它似乎并没有工作。 你有什么想法? 谢谢你。
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.
推荐答案
请问<一href="http://www.c-sharpcorner.com/UploadFile/Nildo%20Soares%20de%20Araujo/TransparentControls11152005074108AM/TransparentControls.aspx"相对=nofollow>这个教程帮助吗?它由三步骤:启用透明,覆盖OnPaintBackground并覆盖OnMove
Does this tutorial help? It consists of three steps: Enabling transparency, overriding OnPaintBackground and overriding OnMove
这篇关于如何重叠的两个控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!