描述:客户端图标实现最小化,类似qq最小化状态:
实现代码:
实现类似qq图标最小化功能notifyIcon控件
private void Form1_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Hide();
this.notifyIcon1.Visible = true;
}
}
private void notifyIcon1_Click(object sender, EventArgs e)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
}
扩展:类似其他任何窗体都可以实现最小化