Click to See Complete Forum and Search --> : Forcing windows to repaint.


edgebird
February 25th, 2010, 09:02 AM
Hey,

I have a few questions about repainting windows (in windows xp/+).
I would like to FULLY repaint a hidden window / (maybe even partially hidden windows) on command. Does a command exist for this? Windows you minimize for example don't get repainted. And making WM_PAINT trigger will only result in errors. Moving it offscreen will also not make it repaint.

Does anyone know a workaround this? If its even possible.
I know it sounds weird but I'm sure its the only way to make it work.


Thanks already.

e: Tricking Windows(OS) into thinking the window should be repainted should work too. (This should cause some weird behavior but that doesn't matter to me :))

CreganTur
February 25th, 2010, 11:54 AM
Setting the form's Paint event and using something like:
Graphics g = e.Graphics
is an option... otherwise you could call Invalidate()- this forces a repaint.

BigEd781
February 26th, 2010, 12:03 PM
Hey,
I know it sounds weird but I'm sure its the only way to make it work.


I wouldn't be so sure. Why don't you tell us what you are actually attempting to accomplish?

rliq
February 27th, 2010, 02:26 AM
Moving it offscreen will also not make it repaint
How on earth did you verify that? Or have I missunderstood?