C#中点击最小化的图片怎么让整个窗体最小化了
1个回答
展开全部
添加一个 notifyIcon控件,并设置它的单击事件
private void notifyIcon1_Click(object sender, EventArgs e)
{
if (this.WindowState != FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Minimized;
}
else
{
this.WindowState = FormWindowState.Maximized;
}
}
也可以把窗体隐藏
this.Hide();
显示
this.Show();
private void notifyIcon1_Click(object sender, EventArgs e)
{
if (this.WindowState != FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Minimized;
}
else
{
this.WindowState = FormWindowState.Maximized;
}
}
也可以把窗体隐藏
this.Hide();
显示
this.Show();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询