BaseForm.OnActivated(EventArgs) Method

Definition

Occurs when the base form is activated.

protected:
 override void OnActivated(EventArgs ^ e);
protected override void OnActivated (EventArgs e);
override this.OnActivated : EventArgs -> unit
Protected Overrides Sub OnActivated (e As EventArgs)

Parameters

e
EventArgs

A EventArgs that contains the event data.

Examples

The following example overrides the OnActivated method, calls the base class OnActivated method, and then calls a custom method to set the background color.

protected override void OnActivated(EventArgs e) {

    base.OnActivated(e);

    if (!_initialActivate) {
        _initialActivate = true;
        OnInitialActivated(EventArgs.Empty);
    }

    setFrameBackground();  // background color, etc
}

Notes to Inheritors

This method provides an opportunity to perform processing after the BaseForm object has been activated.

Applies to