protected override void WndProc(ref Message m)
{
const int SC_MINIMIZE = 61472; if(m.WParam.ToInt32() == SC_MINIMIZE )
{
//最小化替代处理程序,例如下面的代码使窗体最大化
this.ShowInTaskbar = false ;
FIcon.Visible = true ; //FIcon是是个Iron控件
}
else
{
base.WndProc(ref m);
}
}
{
const int SC_MINIMIZE = 61472; if(m.WParam.ToInt32() == SC_MINIMIZE )
{
//最小化替代处理程序,例如下面的代码使窗体最大化
this.ShowInTaskbar = false ;
FIcon.Visible = true ; //FIcon是是个Iron控件
}
else
{
base.WndProc(ref m);
}
}
{
if(this.WindowState==FormWindowState.Minimized)
{
this.ShowInTaskbar = false ;
FIcon.Visible = true ; //FIcon是是个Iron控件
}
}
{
const int SC_MINIMIZE = 61472; if(m.WParam.ToInt32() == SC_MINIMIZE )
{
//最小化替代处理程序,例如下面的代码使窗体最大化
this.ShowInTaskbar = false ;
FIcon.Visible = true ; //FIcon是是个Iron控件
this.Hide();
}
else
{
base.WndProc(ref m);
}
}
//*************************
//OK!.搞定! 多谢l0f(凌风) !