Load vs. Shown events in Windows Forms

后端 未结 6 726
难免孤独
难免孤独 2020-12-25 11:13

Hopefully I\'m just missing something obvious, but I\'m trying to get my head around the differences between the Load and the Shown events in Windows Forms.

Traditio

6条回答
  •  不知归路
    2020-12-25 11:37

    Here's the sequence of event I traced. May this will help others to decide how they would like to call or set their custom event handling

    Events traced

    Form - Client Size Changed : 8/14/2010 10:40:28 AM
    Form - Control Added - button1 : 8/14/2010 10:40:29 AM
    Form - Constructor : 8/14/2010 10:40:29 AM
    Form - Handle Created : 8/14/2010 10:40:29 AM
    Form - Invalidated : 8/14/2010 10:40:29 AM
    Form - Form Load event : 8/14/2010 10:40:29 AM
    Form - Loaded : 8/14/2010 10:40:29 AM
    Form - Create Control : 8/14/2010 10:40:29 AM
    Form - OnActivated : 8/14/2010 10:40:29 AM
    Form - Shown : 8/14/2010 10:40:29 AM
    Form - OnPaint : 8/14/2010 10:40:29 AM
    Form - Invalidated : 8/14/2010 10:40:29 AM
    Form - OnPaint : 8/14/2010 10:40:29 AM

提交回复
热议问题