How can I hide my application's form in the Windows Taskbar? [duplicate]
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开发者_如何学Go.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;
精彩评论