Yup - thats exactly it Andrew On Thu, 15 Mar 2007 10:42:10 +1300, Alex Henderson <[EMAIL PROTECTED]> wrote:
>Alas for what we're doing with the hosted designer they need to overlap each >other and implement transparency... > >So pseudo-code wise I guess you're saying I need to grab the parent of my >control and walk the contents in z-order from bottom to top, identifying >which controls dimensions overlap my control, then invoking paint/paint >background for each? ... guess I'll give that a go ;o) > >Yeah, shame I can't use WPF for this project... > >Cheers, > > - Alex > >-----Original Message----- >From: Discussion of advanced .NET topics. >[mailto:[EMAIL PROTECTED] On Behalf Of Eames, Andrew >Sent: Thursday, 15 March 2007 8:50 a.m. >To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM >Subject: [ADVANCED-DOTNET] Making WinForm control backgrounds transparent at >design time > >I don't think this is a design time vs run time issue - it's a question >of how the controls implement transparency. > >It largely depends on whether your controls will overlap other controls >or not. > >If they don't overlap other controls then setting the BackColor to >transparent is sufficient - WinForms will paint the parent in the client >area. > >If they can overlap other controls (and I don't really recommend this), >you need to do more work and basically call InvokePaintBackground and >InvokePaint on all the relevant controls beneath your control in the >correct Z order. > >FWIW - WinForms is horribly inefficient when it comes to implementing >transparency - it doesn't appear to apply any clip regions to the parent >of a transparent control > Andrew > >-----Original Message----- >From: Discussion of advanced .NET topics. >[mailto:[EMAIL PROTECTED] On Behalf Of Alex Henderson >Sent: Wednesday, March 14, 2007 3:04 PM >To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM >Subject: [Spam:***** SpamScore] [ADVANCED-DOTNET] Making WinForm control >backgrounds transparent at design time > >Hi all... > > > >I'm hosting my own windows forms designer (WinForms 2.0) and have a >number >of custom controls that can be dropped onto the host and arranged, much >like >the VS.Net designer... however just like the VS designer any controls >with >their background flagged transparent are being rendered with the parents >background colour... > > > >Does anyone know of a way to get the controls to render with actual >transparent backgrounds during design time... omitting rendering the >background at all (by overriding OnPaintBackground and doing nothing) >doesn't appear to work. > > > >Cheers, > > > >- Alex > > >=================================== >This list is hosted by DevelopMentor(r) http://www.develop.com > >View archives and manage your subscription(s) at >http://discuss.develop.com > > >-- > >=================================== >This list is hosted by DevelopMentor. http://www.develop.com > >View archives and manage your subscription(s) at http://discuss.develop.com > >=================================== >This list is hosted by DevelopMentorĀ® http://www.develop.com > >View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com