Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Save Memory with A Picture Box

Set the AutoRedraw property to True and the benefits and trade-offs include much faster repaints and some wasted memory. If your form is resizable, you waste a lot of memory, because the persistent bitmap used by AutoRedraw is as large as the maximum dimensions of the form to reveal the hidden output when the user resizes or maximizes the window. If the graphic output you want to preserve is limited to a relatively small portion of a large and/or resizable form, you may save some precious memory drawing your graphic output in a picture box with AutoRedraw = True and possibly BorderStyle = 0, while leaving the AutoRedraw property of the form set to False.

Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date