Previous Page

Speeding Up the Start of Your Application

First impressions are important. The first impression your application makes depends, in part, on how long it takes to display the first form. You can use the following techniques to speed up the start of your application.

Use a Form Module for Any Code in Your Startup Form

If your startup form calls procedures in several modules, then all of those modules are loaded when your application starts up, and that takes time. Put any procedures that your startup form calls in a single form module; your startup form shouldn't call procedures in standard modules.

Minimize the Amount of Code in Your Startup Form

Because the amount of time required to load a form is directly related to the size and complexity of the form and its code, simplify your startup form to make sure it's displayed as soon as possible after your application starts. For the highest level of performance, don't use any code in your startup form.

See Also   For more information on simplifying your forms' design and reducing the amount of code in your forms, see "Optimizing Form Loading and Paging" later in this chapter.

Don't Use ActiveX Controls on Your Startup Form

Visual Basic loads an ActiveX control at the same time it loads the form using the ActiveX control. Using ActiveX controls, formerly called OLE controls or custom controls, on a form increases the time it takes to load and display the form. Visual Basic can load and display your startup form more quickly if it doesn't include ActiveX controls. Typically, the startup form is a simple About dialog box, an introductory screen, or a Logon dialog box.

© 1996 Microsoft Corporation. All rights reserved.

Next Page


Casa de Bender