Thanks Ryan. A couple of weeks ago, someone posted how to build a transparent control; basically by never clearing the control's graphics, but using me.Refresh false to rewrite the underlying graphic, then just drawing whatever else is needed. Perhaps my experience will help others:
For those contemplating doing this: In my implementation, it works nicely, but only works for a very small number of such controls. The problem is that for larger controls or many controls the delay between me.refresh causing a Paint of the underlying graphic and the control's own drawing of its elements even from a buffer, flicker is unavoidable, since for a moment the underlying graphic is displayed without any of the top level control's own graphic. I am able to make this work without flicker for some operations (such as animating rollover or pushing of individual buttons) by storing the rectangle of the underlying graphic found under the button, drawing it into my buffer, then drawing the button's graphic and using DrawPicture to display the completed graphic. As a general solution, I think Ryan's approach is ultimately the cleanest. (btw, the question came up regarding Refresh True vs Refresh False. Refresh True appears to erase the background down to the underlying window, whereas Refresh False merely seems to cause each underlying layer to redraw. The former causes even more flicker because for a moment a white or grey rectangle is displayed.) -Tom > Date: Tue, 20 Mar 2007 10:47:57 -0700 > From: Ryan Dary <[EMAIL PROTECTED]> > Subject: Re: Refresh, Invalidate and Paint > > > > Always draw to a buffer and then paint the whole buffer to the .graphics > property of the canvas, window or containerControl. Anything else will > likely end up in flickersville. > > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
