How to send redraw message to background windows
-
Hi guys i am doing an app where i am using ControlPaint.DrawReversibleFrame to paint the drag siluet of a rectangle over the screen but in a certain condition when a user does a mouseup i have to "animate"the movement of that rectangle so it returns to a place in the screen but when the rectangle starts to animate the movement it keeps the last position rect in the screen so it does not send the redraw message to the background windows. Can someone they me how to fix this mess?
-
Hi guys i am doing an app where i am using ControlPaint.DrawReversibleFrame to paint the drag siluet of a rectangle over the screen but in a certain condition when a user does a mouseup i have to "animate"the movement of that rectangle so it returns to a place in the screen but when the rectangle starts to animate the movement it keeps the last position rect in the screen so it does not send the redraw message to the background windows. Can someone they me how to fix this mess?
You could try making a call to
System.Windows.Forms.Application.DoEvents()
although that might just be for the process you call it from. -
Hi guys i am doing an app where i am using ControlPaint.DrawReversibleFrame to paint the drag siluet of a rectangle over the screen but in a certain condition when a user does a mouseup i have to "animate"the movement of that rectangle so it returns to a place in the screen but when the rectangle starts to animate the movement it keeps the last position rect in the screen so it does not send the redraw message to the background windows. Can someone they me how to fix this mess?
Hi, the way I understand it, the ControlPaint.DrawReversible methods don't need the help of other windows or processes to execute immediately, and calling them a second time undoes the drawing of the first time, so if some of them remain visible, it suggests you didn't execute them in pairs in the right order (i.e. A A B B C C). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.