不要用THIS呀。
某些地方不要用呀。

解决方案 »

  1.   

    private void menuItem2_Click(object sender, System.EventArgs e)
    {
    Application.Exit ();
    }private void menuItem1_Click(object sender, System.EventArgs e)
    {
    this.Visible =true;
    this.notifyIcon1.Visible=false; this.WindowState=System.Windows .Forms .FormWindowState .Normal;
    this.ShowInTaskbar=true;
    this.Width=300;
    this.Height =300;
    this.SetDesktopLocation (145,110);
    }private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    menuItem1_Click(sender,e);
    }private void Form1_Resize(object sender, System.EventArgs e)
    {
          if(this.WindowState==System.Windows .Forms .FormWindowState .Minimized )
    {
    this.Visible =false;
    this.ShowInTaskbar =false;
    this.notifyIcon1.Visible =true;
    }
    }
    你这样试试,应该可以的,因为你要理解这些界面的显示顺序和过程,呵呵,我也不是很明白,你可以在一些地方加上MessageBox.show(this.Location.X.toStirng()+this.Location.Y+"|"+this.Width+this.Height);
    看一下它的变化过程,明白/?
      

  2.   

    奇怪啊,我用了tavor(龙双公子)的办法,遇到一个大家都想不到的问题,窗口是出现了,但是窗口上的控件除了一个BUTTON(因为它FOCUS())外,其他的都没有了,怎么回事呢,变态啊,