OnLoad Event (AForm)

Occurs when a form is loaded after its controls and menu are created.

Syntax

Object.OnLoad()

The OnLoad event syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

Comments

The event occurs as a result of a Load statement. It is called after the form and its controls and menu objects are created.

The OnLoad event occurs after the OnInitialize event.

Typically, you use a OnLoad event procedure to include initialization code for a form and its controls and menu. For example, code that specifies default settings for controls, indicates contents to be loaded into ComboBox or ListBox controls, and initializes form-level variables.

When ATEasy calls this event the form window is already created (hWnd property is not 0) but is not visible. After the OnLoad is completed the form is shown if the Visible property is set to True.

Procedure MyForm.OnLoad(): Void Public

{

! disable the OK button and set the status bar initial text

btnOk.Enabled=False

sbr.Pane(0).Text="Ready"

}

Applies to

AForm

See Also

Load, OnActivate, OnGotFocus, OnInitialize, OnUnload, OnQueryUnload, OnResize, Visible