c# - Redrawing during drag and drop -


I want to trigger the target control to automatically redraw (triggering or refreshing) during the dragent and drag leve event I am Code looks like this:

  Protected Override Zero Underground (DragEventErgues Drazag) {// - Set up an asset that affects the diagram of control, then create it again. Mimper = true; This.Refresh (); //-- does nothing??? } Safe Override Zero OnDragLeave (EventArgs E) {// - Set a property that affects the control diagram, then create it again. MyProperty = false; This.Refresh (); //-- does nothing??? }  

It does not really regulate the control, but the open paint is not called by refresh (in these incidents) is there any way to do this? I should not understand anything here

Update: The response provided by Jason does not really work when using invalid () or invalid (rect) control does not actually update it called Is during a drag and drop action any other thoughts? Can you draw a red click of a control during drag and drop? Thanks!

Update 2: I created a sample project and could not get it to work not . Breathe ... Eventually I tracked some code in OnPaint which was causing the problem. So, I did not know how Debugger works (this does not ever take a break point in the openpint ... why still do not know). Invalid (), Refresh () Both jobs get Jason H because it was finally true and also showed how only one part of control can be invalidated ... I did not know about that

Thank you for all your help!

call this.Invalidate () to get form / control Repeat If you know the specific area, call one of the overloaded methods to specify what is to be invalid. For example:

  Rectangle for rectangle = new rectangle (drags. X-50, drags.-50, 50, 50); This.Invalidate (toInvalidate);  

This will invalidate an area 50 pixels around that area which is a drag target.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -