For non-metro apps, the ProcessStartInfo.WindowStyle
can be used to run the app minimized:
ProcessStartInfo processStartInfo = new ProcessStartInfo("notepad.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(processStartInfo);
It is also possible using Kernel32.CreateProcess.
However, for metro apps, the Window Style approach does not work:
ProcessStartInfo processStartInfo = new ProcessStartInfo("microsoft-edge://");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(processStartInfo);
and CreateProcess is only applicable for non-metro apps.
Is there a way to run metro apps minimized? (Note that this is different from running the metro app, getting the window handle, then minimizing the window)