Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LOAD Statement Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
LOAD {form | ctlname[index%]}
Usage Notes
■ It is not necessary to use the LOAD statement with forms. Any reference
to a form automatically loads it if the form is not already loaded. For
example, the SHOW method loads an unloaded form before displaying it.
See: ◄SHOW Method►
■ When an application starts, Visual Basic automatically loads and
displays the application's start-up form, if one exists. The start-up
form's Visible property must be set to True (-1).
See: ◄Visible Property►
■ Use the HIDE method on an unloaded form to load the form without showing
it. See: ◄HIDE Method►
■ Use the SHOW method rather than the LOAD statement to display hidden or
invisible forms. See: ◄HIDE Method► ◄SHOW Method► ◄Visible Property►
■ Once a form is loaded, all run-time properties for the form and its
controls can be accessed by the program, whether or not the form is
actually visible.
■ Attempting to load an already loaded form has no effect.
■ When Visual Basic loads a form, it sets form properties to their initial
values and then executes the Load event procedure. See: ◄Load Event►
■ Visual Basic can only load one instance of a specific form when an
application is running, but it can load and display multiple instances
of a control that was defined as a control array at design time. For
example, you can design a form with a single check box, but define
that check box as a member of an array of check boxes. At run time,
this allows your application to respond to specific conditions by
loading new check boxes into the array and receiving events from them.
See: ◄Creating a Control Array►
■ Standard dialog boxes produced by Visual Basic functions such as MSGBOX
and INPUTBOX$ are invoked by direct reference. They cannot be loaded,
shown, or unloaded. See: ◄MSGBOX Function► ◄INPUTBOX$ Function►