The Form Paint event is useful when you have output from graphics programs in your code. With a Paint procedure, you can ensure that such output is repainted when necessary.
If e.g. you want a gradient color for the Background of a form, you can draw this gradient in the Paint Event.
The Paint Event is invoked when the Refresh method is used. It the AutoRedraw property is set to True, repainting or redrawing is automatic and Paint events are not necessary.
In principle, you Load the form only once because this is a resource consuming operation. The form stays in memory until you Unload it. During this time you can possibly Hide it.
If you want to change any of the graphics on the form, there is no need to Load the form again.
The Paint event is the most appropriate place to do so. _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.