FILE: Whitepaper on Optimizing Visual Basic

Last reviewed: February 5, 1997
Article ID: Q147664
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SUMMARY

The whitepaper covers many aspects of optimizing Visual Basic 4.0 programs. This includes, but is not limited to, the following topics:

  • Optimization philosophy: where to start and where to stop
  • Determining what aspect(s) to best optimize
  • Optimizing actual speed: - use correct data types - cache properties in variables - use of correct looping constructs
  • Optimizing display speed - proper settings of graphics related properties - use of controls vs. code when appropriate
  • Optimizing apparent speed - performing work behind the scenes - doing heavy computational tasks when time is available - how to speed up load times, both real and perceived
  • Keeping application memory size small - using correct data types - reclaiming unused space - cutting back on graphics
  • Segmenting applications with OLE - ability to load and unload on demand - 16-bit code can be separated from 32-bit code - using remote OLE servers to distribute load
  • Optimizing OLE - early binding vs. late binding - using proper language constructs - minimizing cross process calls

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ Vboptimz.exe

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services


KBCategory: kbappnote kbprg kbref kbfile
KBSubcategory: Refs vb4win vb4all
Additional reference words: 4.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.