简体   繁体   English

Windows 10 任务栏中的标题在 winforms c# 中不在主窗体上时发生更改

[英]Title in Windows 10 Task Bar changes when not on main form in winforms c#

I have a standard Winforms Application.我有一个标准的 Winforms 应用程序。 When the user is on the Main Form, the caption in the task bar for the program matches the Main Form's caption当用户在主窗体上时,程序任务栏中的标题与主窗体的标题匹配

However, as soon as the user goes into a form that I load from the main form, using ShowDialog, the caption on the taskbar goes to the name of the application但是,一旦用户进入我从主窗体加载的窗体,使用 ShowDialog,任务栏上的标题就会转到应用程序的名称

How can I prevent this from happening?我怎样才能防止这种情况发生?

The Assembly.Title is being ignored Assembly.Title 被忽略

Cheers干杯

Paul保罗

If you set ShowInTaskbar = false on the dialog form it should mean that Windows takes the text of some other form in your app that is still allowed to show.如果您在对话框表单上设置ShowInTaskbar = false ,这应该意味着 Windows 会采用您的应用程序中仍允许显示的其他表单的文本。 As you have only one other form (at the moment) this will be the main form text由于您只有一种其他表格(目前)这将是主要表格文本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM