Common .NET public form events
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Common .NET public form events
The following table shows some of the more common .NET public form events. Other common events for controls might also apply to forms. For more information, see Table 1.
| Event | Description |
|---|---|
Activated
|
Raised when the form receives focus. The form
also publishes this event when you call the form Activate( ) method. |
Deactivate
|
Raised when the form loses focus. |
FormClosed
|
Raised when the form is closed by the user,
by the form Close( ) method, or by the
static Exit( ) method on the System.Windows.Forms.Application class. |
FormClosing
|
Raised as the form is closing, but before the FormClosed event
is raised. You can set the Cancel property on the FormClosingEventArgs parameter when
handling this event to cancel the close of the form and prevent the FormClosed event
from being raised. |
Load
|
Raised before the form is displayed for the first time, allowing you to allocate resources for and further configure the form before it actually becomes visible. |
Shown
|
Raised immediately after the form is displayed for the first time. |