更新时间:2023-11-11 20:41:58
如果我正确理解您的问题,您需要做的就是添加一个处理程序,以便在显示表单时处理.当 InitializeComponent 调用完成时,并不意味着窗体还没有完全打开.
If I'm understanding your problem correctly, all you need to do is add a handler for when the Form is shown. When InitializeComponent is finished calling, it doesn't mean the form has been fully opened yet.
在 InitializeComponent 之后,(或者***在里面)你可以简单地添加
After InitializeComponent, (or preferrably inside) you could simply add
Load += OnLoad;
关注
public void OnLoad(object sender, EventArgs e)
{
}
您可以在其中添加或调用启动功能.
Which is where you can add or call the launch function.