Jump to content
Xtreme .Net Talk

Pselus

Avatar/Signature
  • Posts

    29
  • Joined

  • Last visited

Everything posted by Pselus

  1. well...it's gonna be pretty tough to show all the relevant code because 1) it's huge and 2) it's code for my company and I can't show much of it (I always hate that rule). Mainly, I think one of my problems with that example is that our program uses this panel for other controls. See, this is a panel that was built for this company by a different programmer who no longer works here...he did it solely for the purpose of creating rounded edges in a panel. Then, when they asked for buttons with rounded edges and labels with rounded edges and tab-controls with rounded edges he (stupidly in my opinion) used this panel to create them. For the label, he created a control with this panel and a windows label inside of it. This means that on any given form I have lots of instances of this panel, all of which are trying to be transparent and I end up with controls not completely drawing for some reason... From what I understand this whole WS_EX_Transparent thing just tells the control to wait to draw after it's children and parents...but what happens when a control with this setting is a child of another control with this setting?
  2. sadly no...that does allow me to make the corners transparent without calling MyBase.OnPaintBackground...but it raises a whole host of other issues like not fully drawing the controls until events are raised...though I'm sure that this is my code interfering with what works from that example...but I can't for the life of me figure out why. :(
  3. guess no one wants to touch this one with a 10 foot pole eh? let me try to make it easier. How could I write a procedure to do Transparency just like Color.Transparent would do in VB.Net. That's the gist of it...I need to write what M$ already wrote because theirs only works if OnPaintBackground isn't overridden.
  4. Right, so...long story short, I have a panel with curved corners. I need the portion of the panel outside the curve to be transparent. La-dee-da, that's easy as pie...done did it. Problem: Due to the amount of graphical processing in the app (and the use of this panel ALL over the place), when the application raises an event or resizes there is alot of "flickering". I traced the issue down to the fact that the application is redrawing the background and for a split second it is showing through all the controls (on each of the panels in the application...so it causes alot of visual nastiness). Now, the true problem arises in that, when I override OnPaintBackground...this flickering stops flat out...but I can't get the outside corners to draw transparent. I've tried alot of different things and come to the conclusion that you CANNOT use transparency if you Override OnPaintBackground (and do nothing in it). I pray that I am wrong about that conclusion and was hoping someone here would konw a way that I can. for reference sake my panel is based off this example. Here is a shot of the panel before overriding OnPaintBackground: http://www.livethislife.net/images/ForWork/panelbefore.gif and here is a shot after overriding OnPaintBackground: http://www.livethislife.net/images/ForWork/panelafter.gif So...anyone know of a way for me to draw a transparent rectangle as the background without actually drawing the background? To further complicate matters...I need to do this over gradients.
×
×
  • Create New...