private void Form1_Load(object sender, EventArgs e) { notifyIcon1.Visible = true; //托盘图标显示 this.WindowState = FormWindowState.Minimized; //启动时将窗体设置为最小化 this.ShowInTaskbar = false; //不在任务栏中显示 }