views:

504

answers:

1

I have a WinForms application written in C# for .NET 3.5 that needs to show a specific name in the Task Manager's Applications tab. However, I need for this text to be different from the Form's text.

The behavior I've seen so far is that the Task Manager Applications tab will show the value of the Text property of the System.Windows.Forms.Form being displayed. However, I'd like to display the long name of the application in the Form.Text property, and use an abbreviated name in the Task Manager's Applications tab.

I know this behavior was supported in VB6, where the Application Title (Set through Project Properties -> Make tab -> Application Title field, or in the .VBP file itself) would be the name displayed in the Applications tab. Is there a way to replicate this functionality in C#/.NET?

This bit of information from MSDN seems to indicate that the Text property is the only source in .NET: App Object for Visual Basic 6.0 Users. However, I'd like to know if there's a way around this.

+1  A: 

VB6.0 forms applications used a hidden "parking window" as the true main window of the application. This is how it allowed the task manager name to differ from the main window name. In .Net applications the main window is the true main window of the application.

You could replicate the behavior by starting a hidden form which calls your displayable form but I don't recommend it since you risk getting your application into a state where there is no visible UI but the process is still running.

Joe Caffeine
That's what I was fearing, but oh well. Thanks.
Esteban Brenes