I need to do a button on windows form in c# that maximize and make window normal size every time I push it. I try a code, but it works just if the window is already maximize and just a half of it. How can I solve this? My code is:
if (this.WindowState == FormWindowState.Maximized){
this.WindowState = FormWindowState.Normal;
}
if (this.WindowState == FormWindowState.Normal){
this.WindowState = FormWindowState.Maximized;
}