Hiding forms on startup: why doesn't this.Hide() hide my form?

前端 未结 6 1455
有刺的猬
有刺的猬 2020-12-10 02:58

I wanted to hide the main window of my app on startup, so I put this in the constructor:

this.Hide();

This doesn\'t hide my form though. It

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-10 03:44

    Try setting the visible property of the form to false before it is loaded in the main entry point of your application.

    Form1 obj = new Form1();
    obj.visible = false;
    Application.Run(obj);
    

    Or try setting the co-ordinates of the form to higher location like 9000, 9000.

提交回复
热议问题