views:

196

answers:

3

greetings,

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?

looking forward to your kind help.

thanks.

A: 

Call ShowDialog() like this:

About.ShowDialog(this);

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

this.Parent.WindowState = WindowState.Normal;
Lucas Jones
Or after the ShowDialog()
0A0D
Or after the ShowDialog() : works. but when i try it in the about form it doesn't compile.thanks to all for your help.
iEisenhower
Duh to myself. I suppose that's what you get when you try to be the fastest gun in the West.
Lucas Jones
+4  A: 
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
    this.WindowState = FormWindowState.Minimized;
    about About = new about();
    About.ShowDialog();
    this.WindowState = FormWindowState.Normal;
}
Darin Dimitrov
+1  A: 

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

    this.WindowState = FormWindowState.Normal;

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

MiffTheFox