Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Winform - which is a usercontrol last event to fire

Which is a usercontrol last event to fire when the application/control is loaded? The load event?

like image 695
Saif Khan Avatar asked Jun 03 '09 19:06

Saif Khan


1 Answers

That really depends on when during its life you are talking about. Given your guess at Load, we talk during creation/load. This list shows a few events in the order that they were fired in a simple UserControl that I set up for testing (hooked up a number of eventlisteners and printed the event name to the console):

HandleCreated
Load
Layout
VisibleChanged
Paint

Note that Layout, VisibleChanged and Paint does not strictly have anything to do with the control creation; Layout and in particular Paint may or will be raised at a number of occasions during the life of the control. The same goes for VisibleChanged which is raised whenever the value of the Visible property is changed.

like image 154
Fredrik Mörk Avatar answered Sep 23 '22 23:09

Fredrik Mörk