如何在Windows任务栏中隐藏我的应用程序窗体?

26
我怎样才能隐藏 Windows 任务栏中我的应用程序的名称,即使它是可见的?
目前,我有以下代码来初始化和设置我的窗体属性:
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);

你的应用程序是否可见于任务栏,但你希望它隐藏?或者你的应用程序应该是可见的,但不在任务栏中显示?确切的问题是什么? - Sanjeevakumar Hiremath
1个回答

65

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

this.ShowInTaskbar = false;

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接