Check the invalidated region on paint event?
Posted on 2011-03-01
Hello, in VB.NET forms I occasionally call the Form.Invalidate function and I send in a rectangle. Sometimes I call several of these for the various parts of the form I want refreshed, and -- I think I see -- through windows magic these are sometimes combined into a single paint event.
But this is kind of a black box -- is there a way, in the .NET forms paint event, to check to see if a particular point on my form is *about* to be repainted? (Because if not I don't want to bother to run a lot of code to recalculate its appearance.)