我如何隐藏我的Windows任务栏应用程序的名称,即使它是可见的?
目前,我有以下的code初始化并设置我的窗体属性:
this.AutoScaleDimensions =新System.Drawing.SizeF(6F,13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize =新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 + =新System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load + =新System.EventHandler(this.Form1_Load);
this.ResumeLayout(假);
解决方案
要prevent出现在任务栏的形式,设置它的ShowInTaskbar物业为False。
this.ShowInTaskbar = FALSE;
How can I hide the name of my application in the Windows Taskbar, even when it is visible?
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);
解决方案
To prevent your form from appearing in the taskbar, set its ShowInTaskbar
property to False.
this.ShowInTaskbar = false;