C# winforms startup (Splash) form not hiding

后端 未结 4 1115
鱼传尺愫
鱼传尺愫 2020-12-03 00:30

I have a winforms application in which I am using 2 Forms to display all the necessary controls. The first Form is a splash screen in which it tells the user that it it load

4条回答
  •  悲&欢浪女
    2020-12-03 00:32

    If I have understood correctly, you should just use Application.Run on your main form. So either show your splash first just by using something like:

    using(MySplash form = new MySplash())
       form.ShowDialog();
    

    And then close it manually in MySplash whenever you want to.

    Or show it in your main forms Load event handler and then wait for it to close or whatever until you let the Load method complete. (Possibly setting Visible to false before you show it and back to true afterwards.

提交回复
热议问题