I have several separate processes that are logically connected (but they all start separately - there is no common โparentโ process).
Is it possible that they appear as a single group on the Windows taskbar?
Working sample
Here is a working code inspired by Remy that answers
using System; using System.Runtime.InteropServices; using System.Security; namespace ConsoleApplication1 { [SuppressUnmanagedCodeSecurity] internal static class SafeNativeMethods { [DllImport("shell32.dll")] public static extern int SetCurrentProcessExplicitAppUserModelID([MarshalAs(UnmanagedType.LPWStr)] string AppID); [DllImport("kernel32.dll")] public static extern bool AllocConsole(); [DllImport("kernel32.dll")] public static extern bool FreeConsole(); } internal class Program { public static int SetApplicationUserModelId(string appId) {
To make this work, the executable must be set to "Output Type" on "Windows Application" and configure the "Launch Object" as "ConsoleApplication1.Program" (for the code example above).
source share