lothos12345 Posted April 22, 2005 Posted April 22, 2005 Is there a way to repaint a form in VB.NET? Quote
Leaders snarfblam Posted April 22, 2005 Leaders Posted April 22, 2005 To force itself to repaint? You can invalidate the form (i.e. Me.Invalidate or this.Invalidate()) Quote [sIGPIC]e[/sIGPIC]
lothos12345 Posted April 22, 2005 Author Posted April 22, 2005 Invalidate Invalidation gives me the option to invalidate a region. Now does that work? Me.Invalidate(?region?) Quote
IngisKahn Posted April 22, 2005 Posted April 22, 2005 Be kinda silly if it didn't work. Quote "Who is John Galt?"
AlexCode Posted April 22, 2005 Posted April 22, 2005 It works... If you dig a little bit, you'll find that the EventArgs of the Paint Event have a ClipRectangle read only property that hold the reference of the region that needs to me painted (that is invalidated). You can just discard this info and paint the whole control or, on the other hand, you can use this info to just paint what's necessary... If the painting process is pretty basic, maybe you'll have more work to use this than profit... but if the process is complex, this will save you a lot of run-time performance headaches... Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.