Clearing the graphics of a transparent panel C# -


I have a broker control that it is with a transparent panel above, what am I trying to do A transparent panel around the element in the foil that is hovering over the mouse.

So far, I have everything to do, which is not being cleaned before drawing the next rectangle, so I end up with rectangles everywhere. / P>

using code using the I.

  paneGraphics = drawingPane.CreateGraphics (); Rectangle Inspector Line; Inspector Geometry = Controller Inspector Element (); Panel graphics Dracretangal (New Pen (Blue, 1), Inspector Rankengel); DrawingPane.Invalidate ();  

I have tried using drawingPane.clear () but it whiteens the screen.

Take a look at OpenPindora Project

  Public Square Transparent Panel: Panel {timer ruggler = new timer (); Public Transparent Pencil () {Wriggler.Tick + = New Event Handler (Tick Headlery); This.Wriggler.Interval = 500; this. Magician Competent = true; } Secure Zero TickHandler (Object Sender, EventArgs e) {this.InvalidateEx (); } Protected Override CreateParams CreateParams {Receive {CreateParams cp = base.CreateParams; Cp.ExStyle | = 0x00000020; // WS_EX_TRANSPARENT return CP; }} Secure zero invalidateEx () {If (parent == blank) {return; } Rectangle RC = new rectangle (this. Location, this size); mother-father. Invalid (rc, truth); } Safe Override Zero OnPaintBackground (PaintEventArgs Cover) {// Do not allow to paint the background}}  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -