How can I execute code after my form starts?

后端 未结 5 1448
庸人自扰
庸人自扰 2020-12-11 19:56

I\'m really new to Windows Forms programming and not quite sure what\'s the right way to go about programming.

This is my confusion.

I have a single form:

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 20:33

    Program.cs is not meant to have business rules, it should only call your Form and display it. All datagrid loading/refreshing/editing should be done at your Forms. You should be using the Events defined on Forms class, like: OnLoad, OnUnload, OnClose and many others etc.

提交回复
热议问题