on 2/18/07 8:03 PM, Scott Crick (Lists) at [EMAIL PROTECTED] wrote: > On 2/18/07 4:06 PM, "Chris Little" <[EMAIL PROTECTED]> wrote: > >> This is the expected behaviour. If you're a transparent control and want to >> erase yourself you should be invalidating the control and letting all of the >> controls underneath you redraw. If does mean that you need some kind of flag >> in your control that you can check in your Paint event to control whether or >> not you draw. > > Could you provide a code example here of how to implement this? > > I'm struggling with the same thing. My solution right now, although it's not > the best, is to have the control figure out what is behind it and use that > as a backdrop property which is drawn in each paint event.
Just call invalidate on yourself passing false. Me.Invalidate false This should cause the window to redraw everything under you first and then your control (it may be the tab order) but not erasing anything first. In your paint event you would not do an erase, just draw what you need. You need to be sure that when ever will cause you to redraw to call Refresh or Invalidate with false. Basically you're letter the stuff underneath you do the erasing for you. Chris _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
