您需要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)
| 归档时间: |
|
| 查看次数: |
1199 次 |
| 最近记录: |