I'm using a form for some simple animation using GDI. I use the Paint event but the form doesn't refresh on its own.
What should i do to refresh it atleast every second?
Code_Breaker Thursday, November 29, 2007 7:05 AM
Override forms Paint event and call:
this
.Invalidate(true);
This will repaints you complete form including the childs that are placed on that form
Bala Sekhar Thursday, November 29, 2007 9:39 AM
In addition to calling the Invalidate() method, you might also try calling Update() which forces the control to redraw the invalidated areas rather than waiting for WM_PAINT message to arrive in the message queue.
Martin D. Randall Thursday, November 29, 2007 10:31 AM
Override forms Paint event and call:
this
.Invalidate(true);
This will repaints you complete form including the childs that are placed on that form
Bala Sekhar Thursday, November 29, 2007 9:39 AM
In addition to calling the Invalidate() method, you might also try calling Update() which forces the control to redraw the invalidated areas rather than waiting for WM_PAINT message to arrive in the message queue.
Martin D. Randall Thursday, November 29, 2007 10:31 AM