OnDeactivate Event (AForm)

Occurs when a form object is no longer the active window.

Syntax

Object.OnDeactivate()

The OnDeactivate event syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

Comments

The Active window is the window that appears in the foreground with a highlighted title bar or border to distinguish it from other visible windows. A form can become active by user action, such as clicking it, or by using the  SetFocus methods in code.

The OnDeactivate events occur only when moving the focus within an application. Moving the focus to or from an object in another application does not trigger either event. The OnDeactivate event does not occur when unloading an object.

The OnLostFocus event occurs before the OnDeactivate event.

The event occur for MDI child forms only when the focus changes from one child form to another. In an MDIForm object with two child forms, for example, the child forms receive the event when the focus moves between them. However, when the focus changes between a child form and a non-MDI child form, the parent MDIForm receives the OnActivate and OnDeactivate events.

Example

Procedure MyForm.OnDeActivate() : Void Public

{

Caption="I'm not active"

}

Applies to

AForm

See Also

Load, MDIActiveForm, OnActivate, OnGotFocus, OnInitialize, OnLostFocus, Visible, SetFocus