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);
}
}

解决方案 »

  1.   

    private void Form1_SizeChanged(object sender, System.EventArgs e)
    {
    if(this.WindowState==FormWindowState.Minimized)
    {
             this.ShowInTaskbar = false ;
             FIcon.Visible = true ;  //FIcon是是个Iron控件
             }
    }
      

  2.   

    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控件
                                   this.Hide();
         
    }
    else
    {
    base.WndProc(ref m);
    }
    }
    //*************************
    //OK!.搞定! 多谢l0f(凌风) !
      

  3.   

    另外我怎么才能找到windows消息ID的说明文档?