views:

36

answers:

1

Hi,

I have an application that is starting minimized.

I can set RestoreBounds to set to which size will the window restore when user restores it.

But how can I set if the form should restore to maximized or normal state? Normal is by default. I wish there was something like RestoreWindowState.

Can I do this using API somehow?

A: 

Can't you just add and manage this property yourself?

Add the property to your form.
Override OnClientSizeChanged and check to see if the window state has changed from Minimized.
If so, set the WindowState to the value of your property.
Set a flag so that you only go through the logic once.

Jacob G