如何隐藏在Windows任务栏上我的应用程序的形式? [英] How can I hide my application's form in the Windows Taskbar?

查看:230
本文介绍了如何隐藏在Windows任务栏上我的应用程序的形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何隐藏我的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出现在任务栏的形式,设置它的<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.showintaskbar.aspx"><$c$c>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;

这篇关于如何隐藏在Windows任务栏上我的应用程序的形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆