Re: draw over child controls

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Use the ControlPaint DrawReversiblexxx routines. They cheat by drawing
directly on the decktop so over the top of the child controls too.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"Michele" <m.0.m@xxxxxxxx> wrote in message
news:1138967606.169215.192800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all!
I'm writing a win form application in c# with framework 2.0.

I have a panel on which I add my custom controls.
I'd like the panel to draw a mouse selection rectangle: exactly the
same as windows explorer does when you want to select more than one
file dragging the mouse.

I've tried to draw a blue semi-transparent rectangle overriding panel's
OnPaint method, but child controls are always drawn over it.

How could I obtain the same?
I could change my custom control's model... but is there another way?
Thanks in advance.



.



Relevant Pages

  • Non-rectangular (shaped) main window that has non-rectangular child windows.
    ... I have tried to create a shaped main-window and put some shaped child controls (child windows) on it. ... But I cannot make it work because I do not understand all the intricatenesses of the XShape* functions. ... tell me how to do it (a non-rectangular main-window with many non-rectangular child controls). ...
    (comp.os.linux.development.apps)
  • Re: Windows Classes
    ... Now, if a window contains child controls, you have to recusively walk the child controls; ... its child windows in order to see them. ... but they do not appear when enumerating the window's ... I think it should be related to windows classes (using ...
    (microsoft.public.vc.mfc)
  • Re: Close Button in Balloon Tooltip
    ... This a good suggestion. ... I was not sure that it is possible to add child controls to tooltip window ... because I want to be Windows 2000 compatible. ...
    (microsoft.public.win32.programmer.ui)
  • Re: multiple datagrids
    ... If you want to do that in windows forms application; ... grids dynamically and add them into a scrollable panel container ... control as child controls. ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: ReDrawing of Bitmap is not smooth :(
    ... Double-buffering the form will not double-buffer the child controls too. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ...
    (microsoft.public.dotnet.languages.csharp)