# C#: My app is started minimized, how can I show a form?

**URL:** <https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985>\
**Category:** Factual Questions\
**Created:** [September 23, 2005, 12:26am UTC](https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985 "2005-09-23T00:26:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ms2001](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ms2001/32/18463_2.png) [@Ms2001](https://boards.straightdope.com/u/Ms2001)\
**Post date:** [September 23, 2005, 12:26am UTC](https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985/1 "2005-09-23T00:26:45Z")

</div>

I’m writing a .NET program that will be launched by an external application in the minimized state (i.e. the other app sets WindowStyle to Minimized in the ProcessStartInfo structure it uses to start my program).

I want to pop up a form in the middle of the screen with ShowDialog(), but the form insists on staying minimized until I click its taskbar icon. I’ve tried setting the form’s WindowState property, but even though the property value changes from Minimized to Normal, the form stays minimized.

I have noticed, however, that when I call MessageBox.Show(), _that_ box appears in the middle of the screen, so there must be some way to do it.

In Delphi, I’d call Application.Restore() to unminimize the whole program, but I don’t see an equivalent in .NET. How can I make my form appear without having to unminimize it by hand?

---

<div class="post-metadata">

**Author:** ![Caligulas](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@Caligulas](https://boards.straightdope.com/u/Caligulas)\
**Post date:** [September 23, 2005, 4:28am UTC](https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985/2 "2005-09-23T04:28:25Z")

</div>

Does Form::Show() work, maybe? I’m thinking maybe it just creates some invisible window to just show up in the taskbar, not the actual real window…

---

<div class="post-metadata">

**Author:** ![Caligulas](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@Caligulas](https://boards.straightdope.com/u/Caligulas)\
**Post date:** [September 23, 2005, 4:29am UTC](https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985/3 "2005-09-23T04:29:59Z")

</div>

Hmm, C#? I meant Form.Show() in that case 😃

---

<div class="post-metadata">

**Author:** ![Ms2001](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ms2001/32/18463_2.png) [@Ms2001](https://boards.straightdope.com/u/Ms2001)\
**Post date:** [September 23, 2005, 7:07am UTC](https://boards.straightdope.com/t/c-my-app-is-started-minimized-how-can-i-show-a-form/322985/4 "2005-09-23T07:07:39Z")

</div>

Well, it turns out setting the WindowState to Normal in the Load event (instead of the Resize event or the constructor) solved the problem. Can’t believe I didn’t try that sooner. :smack:
