最笨的办法
取最小化时的location,还原的时候设置回去

解决方案 »

  1.   

    我试的可以,你贴上代码来看看。 private void Form5_Resize(object sender, System.EventArgs e)
    {
    if ( this.WindowState == FormWindowState.Minimized )
    {
    MessageBox.Show( this.Location.ToString() ); this.WindowState = FormWindowState.Normal;
    MessageBox.Show( this.Location.ToString() ); }
    }
      

  2.   

    这个是我的代码
    private void notifyIcon1_Click(object sender, System.EventArgs e)
    {
    this.WindowState=FormWindowState.Normal;
    this.ShowInTaskbar = true;
    this.notifyIcon1.Visible=false;
    } private void Form1_SizeChanged(object sender, System.EventArgs e)
    {
    if (this.WindowState == FormWindowState.Minimized)
    {
    this.ShowInTaskbar = false;
    this.notifyIcon1.Visible=true;
    }
    }