BaseForm.OnActivated(EventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.