tags:

views:

55

answers:

4

Which executes first? Form_Load event or the initialization of components? (C# windows form)

+3  A: 

All the components of a Form are inialized first, then the Form is loaded

w69rdy
+4  A: 

Components will be initialized before form load.

See this article about form event order.

Oded
+1  A: 

If you mean InitializeComponent() method, then it executes first from constructor. If you subscribe for Form_Load event from designer subscription code will be added to InitializeComponent.

Orsol
+1  A: 

The initialization of component is happened in constructor (Designer automatically insert initializecomponent in constructor) while the form_load event fired when the form is displayed first time.

Adeel