可以使用win32api:sendmessage,发送WM_SHOWWINDOW

解决方案 »

  1.   

    那我用this.show()按理来说也可以使窗口恢复了!
      

  2.   

    yes, you can if you can get an object reference of this window.
      

  3.   

    实际上不行,我试过了!我在托盘的弹出菜单用this.show(),没用,不能恢复!
      

  4.   

    private void notifyIcon_DoubleClick(object sender, System.EventArgs e)
    {
    if(this.Visible == false)  //显示主界面
     {
     this.Visible =true;
     this.WindowState=FormWindowState.Normal;
     this.menuItem1.Enabled =false;
     this.menuItem2.Enabled =true;

     }

    }private void Form1_Resize(object sender, System.EventArgs e)
    {
    if(this.WindowState==FormWindowState.Minimized)
    {
    this.Visible =false;
    this.menuItem1.Enabled =true;
    this.menuItem2.Enabled =false;
    }
    else
    {
    this.Visible =true;
    this.WindowState=FormWindowState.Normal;

    }
    }private void menuItem1_Click(object sender, System.EventArgs e)//托盘的弹出菜单
    {

    this.Visible =true;
    this.WindowState=FormWindowState.Normal;

    }