Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Order between OnHandleCreated and OnLoad

On a windows form, is there a guaranteed firing order between these, does anyone know? This is on .NET v2. It appears to be the former(sorry) first.

Thanks

like image 907
tnt1 Avatar asked Jan 25 '26 05:01

tnt1


1 Answers

OnHandleCreated comes first.

From the documentation:

The Form and Control classes expose a set of events related to application startup and shutdown. When a Windows Forms application starts, the startup events of the main form are raised in the following order:

Control.HandleCreated

Control.BindingContextChanged

Form.Load

Control.VisibleChanged

Form.Activated

Form.Shown

like image 154
Pieter van Ginkel Avatar answered Jan 27 '26 17:01

Pieter van Ginkel