1

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?

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
iTEgg
  • 8,212
  • 20
  • 73
  • 107

3 Answers3

4
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,023,142
  • 271
  • 3,287
  • 2,928
1

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
  • 21,302
  • 14
  • 69
  • 94
0

Call ShowDialog() like this:

About.ShowDialog(this);

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

this.Parent.WindowState = WindowState.Normal;
Lucas Jones
  • 19,767
  • 8
  • 75
  • 88
  • Or after the ShowDialog() : works. but when i try it in the about form it doesn't compile. thanks to all for your help. – iTEgg Dec 20 '09 at 19:27
  • Duh to myself. I suppose that's what you get when you try to be the fastest gun in the West. – Lucas Jones Dec 20 '09 at 19:46