Change the ApplicationID of a running process from c#

Posted by Nestor on Stack Overflow See other posts from Stack Overflow or by Nestor
Published on 2010-03-05T16:19:45Z Indexed on 2010/05/09 19:28 UTC
Read the original article Hit count: 240

Filed under:
|
|

In Windows 7 we have the concept of ApplicationID, which allows (among other things) to group several icons in the task bar. How can I change the ApplicationID of a running process from c#? I'm trying to make my WinForm app's icon group with another application. I've tried using Windows API Code Pack Library, sticking the following code in my Load event... but it didn't work. Suggestions?

TaskbarManager.Instance.ApplicationId = "MyAppID";    
Process[] p = Process.GetProcessesByName("OtherProcess");
TaskbarManager.Instance.SetApplicationIdForSpecificWindow(p[0].MainWindowHandle, "MyAppID");

© Stack Overflow or respective owner

Related posts about c#

Related posts about windows-7