我正在编写一个透明的 WinForms 应用程序,我想隐藏该应用程序,使其不显示在任务管理器的应用程序选项卡中。我对它会在流程中显示的事实感到满意(事实上它应该)。如果我设置:
this.ShowInTaskbar = false;
它只隐藏在任务栏中。
我有完整的代码我有一个由标签制成的计时器
public Form1()
{
InitializeComponent();
this.BackColor = Color.LimeGreen;
this.TransparencyKey = Color.LimeGreen;
Timer time = new Timer();
time.Interval = 1000;
time.Tick += new EventHandler(time_Tick);
time.Start();
this.ShowInTaskbar = false;
}
void time_Tick(object sender, EventArgs e)
{
label1_hour.Text = DateTime.Now.Hour.ToString() ;
label_minute.Text = DateTime.Now.Minute.ToString();
label_second.Text = DateTime.Now.Second.ToString();
}