简体   繁体   English

我的应用程序的任务栏问题

[英]Taskbar Issue for My App

When I click on my Winforms app then its forms are opened in separate section in Taskbar with default C# icon. 当我单击Winforms应用程序时,将在任务栏中的单独部分中使用默认的C#图标打开其窗体。 How can I solve this issue? 我该如何解决这个问题?

在此处输入图片说明

Update: 更新:

At first I open my login form as bellow: 首先,我以下面的方式打开登录表单:

Application.Run(new frmLogin());

Then I open my main form from the login form as bellow: 然后,我从登录表单中以下面的方式打开我的主表单:

this.Hide();
frmMain frmMain = new frmMain();
frmMain.Show();

first solution: you can set this property of the form 第一个解决方案:您可以设置表单的此属性

在此处输入图片说明

and another solution : 和另一个解决方案:

Did you try parent form and child form? 您尝试过父母形式和孩子形式吗?

Set Parent of the forms, So they will be open as child of your main form 设置表单的父级,这样它们将作为您主表单的子级打开

For Example(In the main form when You want to open another form) : 例如(在主窗体中,当您想打开另一个窗体时):

FrmChild frmChild= new FrmChild ();
frmChild.Parent = this;
FrmChild.Show();

This sounds like a system problem. 这听起来像系统问题。 Here are 3 solutions: 这是3个解决方案:

  1. Restart your computer. 重启你的电脑。

  2. Restart explorer.exe or File Explorer. 重新启动explorer.exe或文件资源管理器。 How to do it. 怎么做。

  3. Unpin then re-pin your program on the taskbar. 取消固定,然后将程序重新固定在任务栏上。

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

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