Question

i have this code:

    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
    {
        this.WindowState = FormWindowState.Minimized;
        about About = new about();
        About.ShowDialog();
    }

it minimizes the parent window state to minimized and displays a splash form.

my question is when the splash screen closes how do i get back to parentwindowstate.normal?

Was it helpful?

Solution

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
    this.WindowState = FormWindowState.Minimized;
    about About = new about();
    About.ShowDialog();
    this.WindowState = FormWindowState.Normal;
}

OTHER TIPS

If you're using ShowDialog instead of Show; you can add

    this.WindowState = FormWindowState.Normal;

after the ShowDialog call. (ShowDialog is blocking, unlike Show.)

Call ShowDialog() like this:

About.ShowDialog(this);

Then, in the About form's FormClosing event, put:

this.Parent.WindowState = WindowState.Normal;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top