2017-07-03 3 views
1

Pour les applications non-métro, le ProcessStartInfo.WindowStyle peut être utilisé pour exécuter l'application réduite au minimum:Courir Metro Apps Minimized d'un C# application

ProcessStartInfo processStartInfo = new ProcessStartInfo("notepad.exe"); 
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized; 
Process.Start(processStartInfo); 

Il est également possible en utilisant Kernel32.CreateProcess.

Cependant, pour les applications de métro, l'approche de style de fenêtre ne fonctionne pas:

ProcessStartInfo processStartInfo = new ProcessStartInfo("microsoft-edge://"); 
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized; 
Process.Start(processStartInfo); 

et CreateProcess est only applicable for non-metro apps.

Existe-t-il un moyen de réduire les applications de métro? (Notez que ceci est différent de courir l'application de métro, obtenant la poignée de fenêtre, puis minimisant la fenêtre)

Répondre

2

Malheureusement, il semble que l'application UWP dans la barre d'état système n'est pas supportée. Si vous voulez cette fonctionnalité, vous pouvez aider en votant UWP System tray support.