image.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:uYZKcSLzEHA.3820@TK2MSFTNGP11.phx.gbl...
> There are no "Z" layers in GDI+ except that provided by the good old
> painters algorithm. Objects that appear to be on top of others are simply
> drawn last.
>
> The surfaces of controls are clipped by the window extents so if your
> question is how to draw outside of that clipped area then you must obtain
> the desktop window handle and draw upon that.
>
> Like all graphics in GDI+ or indeed GDI, this process is a destructive one
> and the system does not retain any information about what was there
> before,
> it can only get windows to redraw themselves again. Therefore if you wan
> to
> un-draw you must have made a copy of what was there in the first place
> before you mucked it up with whatever you drew.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> 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.
>
>
>
>
>
> "Jason" <jason@mailinator.com> wrote in message
> news:4a8d7ea.0411170629.3668b47c@posting.google.com...
>> Hi --
>>
>> I have a very simple question, the answer of which has eluded me for
>> quite some time: How can I draw at the topmost layer of forms and
>> controls from .NET (or from unmanaged code, that would be fine too)??
>>
>> Any GDI+ drawing I've done only appears on the background of the
>> form/control/whatever. Anything contained by the, say, form, draws
>> over the custom GDI+ drawing. Now, let's say I wanted to do something
>> like the translucent rubber-band select in Win XP explorer: anyone
>> have any idea how that might be done???
>>
>> Many thanks in advance,
>> Jason
>
>