0
Guys, I have a windows form app that after opening a new screen it’s minimizing alone and I’m not able to figure out why.
All the screens I call as follows
Home PagHome = new Home();
PagHome.Show();
this.Close();
And when starting the Forms, I load the following code
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
No error is appearing, and the screen is opening, however after opening it is minimizing.
Does anyone have any idea what it might be?
Well I performed several tests using Visual Studio 2017 and with this code you posted I did not see any error. But you have already checked if you are not using
this.Close()
in the main form ? .– Stan SDK