如何在Windows任务栏中分组不同的应用程序?

Eng*_*fes 5 c# windows grouping taskbar

我在PC上同时运行了5个不同的C#应用​​程序.他们在我的任务栏上占用了大量空间.如何对它们进行编码以在任务栏上组合在一起(使用Windows 10).

Geo*_*rge 8

您需要SetCurrentProcessExplicitAppUserModelID()为所有要共享任务栏按钮的应用程序提供相同的AppID.然后,操作系统会将您的5个应用程序视为同一个应用程序.

确保在显示任何应用程序的UI之前调用SetCurrentProcessExplicitAppUserModelID() .

[DllImport("shell32.dll", SetLastError=true)]
static extern void SetCurrentProcessExplicitAppUserModelID( 
    [MarshalAs( UnmanagedType.LPWStr )] string AppID );

private static string AppID = "some guid"; // use the same ID in all 5 apps

...

SetCurrentProcessExplicitAppUserModelID(AppID);
Run Code Online (Sandbox Code Playgroud)