0

I have to develop a customized control in .net framework 4.5 using windows forms. I have one parent user Control holding two child user controls. I want to paint the parent control ,but the paint event of parent control is invoked before the child controls, so whatever drawn is getting hidden by the child control painting.How can i draw a polygon across the full control?

  • 1
    So you want your parent to draw, then the children, but to draw something over the top? check the paint function.. put code in the parent after the base call – BugFinder Jul 31 '15 at 12:55
  • Maybe this will help you solve the issue: http://stackoverflow.com/questions/282838/drawing-on-top-of-controls-inside-a-panel-c-winforms or this http://stackoverflow.com/questions/7060555/can-i-draw-on-a-form-above-all-controls – ar53nic Jul 31 '15 at 13:00
  • Why would you want to draw over the child controls?? If you don't want them delete or hide them, no? - Can you post a link to an image of what you want to achieve?? – TaW Jul 31 '15 at 13:13
  • First thanks for your reply.But I want the parent to draw after the children are drawn.I need the child controls to display all the time.But,above the child controls i have to draw a line – Aneesha baby Jul 31 '15 at 13:54
  • If it is a straight line you could do as in one of the link, where a very slim UC is added, which looks like a line.. Will the children be used interactively? – TaW Jul 31 '15 at 14:17
  • Dynamically i need to draw lines across the full control.as time progresses i need to update the position of these lines too. – Aneesha baby Aug 01 '15 at 08:53

0 Answers0