I have a Windows Forms application that does not include a title bar, and on Windows 7, the taskbar shows the value from AssemblyTitle, rather than the value from the form's Text property. How can I change this value dynamically?
Thanks!
I have a Windows Forms application that does not include a title bar, and on Windows 7, the taskbar shows the value from AssemblyTitle, rather than the value from the form's Text property. How can I change this value dynamically?
Thanks!
From your comments, I think you're referring to the "jump list" for the program, which includes a program title (if you click on it, an additional instance of the program is launched). My understanding is that what you're seeing is the default behaviour for all applications, regardless of the visibility of the title bar on your Form.
I tried to change this on a program I was writing and came to the conclusion that (at least within managed code) it cannot be done - Win 7 takes the value of the FileDescription in the executable (AssemblyTitle is a proxy for this in Win Forms apps) and uses this. As far as I know, assembly attributes cannot be altered for a running assembly and I'm not sure Windows would notice a change and update the jump list even if you could do it.
There is a managed wrapper for the Win 7 API (the Windows API Code Pack), and although there is a class for manipulating Jump Lists, I found nothing within it to override the default behaviour for this particular aspect of them.
Edit: Looking more closely into the native API (as opposed to the managed Code Pack wrapper), I couldn't find any functions but I did discover this MSDN blog entry. Just under the second diagram (which defines the application title as part of the "Taskbar Tasks" section) and the Windows SDK quote, there is a list of activities developers can perform and it includes the following:
As developers we have no control over the Taskbar Tasks.
So it looks like it's just not possible - this section of the Jump List is controlled exclusively by the OS.