How can I keep my form from repainting until I'm ready for it to repaint?
Printable View
How can I keep my form from repainting until I'm ready for it to repaint?
You can override the OnPaint method which is responsible for firing the paint event
VB Code:
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) If isReady Then MyBase.OnPaint(e) End If End Sub
Thanks I'll Try It.
I tried that, it repainted even with my boolean set.
The paint event happened anyway.
Any other ideas?
No, I was wrong.
It's working just fine
Thanks
For completeness:
most of the Graphics class's methods support a bool callback function that gets called periodically during intensive drawing, if you pass one of your own functions to this callback ten you can abort the drawing by manipulating the value returned by your function.