Sunday, 8 September 2013

getting correct window style as configured by windows shortcut

getting correct window style as configured by windows shortcut

When you create a shortcut in windows to an application, in its properties
you can define under "Run:" the initial window state (Minimized /
Maximized / Normal). C# applications do not, apparently, start up their
forms according to this configuration out-of-the-box, so I figured I need
to get this information somehow and write a code that does that
programmatically on start up. I cannot find a way to get this information
in my c# application. I have tried:
Process.GetCurrentProcess().StartInfo.WindowStyle
But for some reason this is always "Normal" regardless of the
configuration in the file shortcut.
Does anyone have any idea how to come around this?

No comments:

Post a Comment