如何在Windows任务栏中隐藏我的应用程序表单? [重复]

时间:2022-06-20 07:26:33

This question already has an answer here:

这个问题在这里已有答案:

How can I hide the name of my application in the Windows Taskbar, even when it is visible?

如何在Windows任务栏中隐藏应用程序的名称,即使它可见?

Currently, I have the following code to initialize and set the properties of my form:

目前,我有以下代码来初始化和设置我的表单的属性:

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(0, 0);
this.Controls.Add(this.eventlogs);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Form1";
this.Text = "Form1";
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);

1 个解决方案

#1


49  

To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.

要防止表单出现在任务栏中,请将其ShowInTaskbar属性设置为False。

this.ShowInTaskbar = false;

#1


49  

To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.

要防止表单出现在任务栏中,请将其ShowInTaskbar属性设置为False。

this.ShowInTaskbar = false;