Winforms - order of Load and Activated events

前端 未结 3 1578
渐次进展
渐次进展 2021-02-08 02:18

One of our users has sent in a log for our .NET Winforms application that indicates that the Activated event is occurring before the Load

3条回答
  •  清酒与你
    2021-02-08 03:03

    Activated comes before Load. If you want to write some code that should be executed after Load then you can Use Shown Method.

    Please find below the sequence :

    • Activated
    • Load
    • Shown

    EDIT : Please check this very interesting answer on SO which explains WinForms Load vs. Shown events

    EDIT :I have Now created one default Winform project with single winform. Now it is giving me sequence

    • Load
    • Activated
    • Shown

    I am confused now.

提交回复
热议问题