问题
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);
回答1:
To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.
this.ShowInTaskbar = false;
来源:https://stackoverflow.com/questions/5217108/how-can-i-hide-my-applications-form-in-the-windows-taskbar