1个回答
展开全部
在你的窗体上添加一个notifyIcon控件,这个控件就是控制显示在任务栏的.在这个控件的
按钮点击事件
private void button1_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.notifyIcon1.Visible = true;
}
将窗体从任务栏点击出来的
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.WindowState = FormWindowState.Normal;
this.Visible = true;
}
按钮点击事件
private void button1_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.notifyIcon1.Visible = true;
}
将窗体从任务栏点击出来的
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.WindowState = FormWindowState.Normal;
this.Visible = true;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询