Winforms - order of Load and Activated events

前端 未结 3 1581
渐次进展
渐次进展 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:13

    Even though it goes against Microsoft's documentation, this can happen sometimes when you access a loading form's public variable or function from outside the form. If necessary, you can set a flag in the shown event and use it to exit the activated handler before the form has loaded.

提交回复
热议问题