Forms don't redraw when moved...

  • Thread starter Thread starter Ben Coats
  • Start date Start date
B

Ben Coats

I have a problem in one of my applications. The main
window is the MDI parent, and I may have as many as 3 or
4 forms open at a time within the main form. However,
regardless of how many forms are open, if I try to move
one of the forms, it won't redraw when I move it. It
looks similar to when your system is frozen/the processor
is maxed out and you try to move a window. However, when
I check system diagnostics, there are always lots of free
system resources. I've had this problem for the entire
time I've worked on this application (about 6 months) and
have not been able to figure out how to resolve it. Has
anyone else ever had this problem? Does anyone know how
it can be fixed?

Thanks!
Ben
 
Never mind, I figured out how to fix it finally. I just
call the .Refresh method of the MDI parent when any
children are moved. Thanks anyways!
 
Hi Ben,

You can also optimize the painting by invalidating the form if the form was
overlapped by the moving form.

i.e.
After move,
Check areas that was covered by the moving form before move.
Invalidate the areas.

HTH,

JOhn
 
Hi Ben,
Good newsgroup 6 months work and one message did give you the idea :-), the
one from yourself.
Success
Cor
 
Back
Top