I want a simple way to maximize and normal windowstate all in one button (click me for image)
Method (code) c# coding -
int maxornot;
private void MaxButton_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
maxornot = 1;
if (WindowState == FormWindowState.Minimized);
{
maxornot = 0;
}
if (maxornot == 0);
{
}
}
if this method is pointless and there is a way to simplify the code then leave a code below.
p.s i didn't put much thought into how to get this method to work cause im just having headaches :P