设置窗体的属性
this.WindowState = FormWindowState.Minimized;

解决方案 »

  1.   

    JF   这里发言,表示您接受了CSDN社区的用户行为准则。 
    请对您的言行负责,并遵守中华人民共和国有关法律法规,尊重网上道德。 
    转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。 
      

  2.   

    加个NotifyIcon什么东西的 然后加个图标上去
    再把窗体的显示到任务栏的属性去掉
    你找找看rivate   void   Form1_SizeChanged(object   sender,   System.EventArgs   e) 

    NotifyIcon组件
    if(this.WindowState==System.Windows.Forms.FormWindowState.Minimized) 

    this.Hide(); 
    this.notifyIcon1.Visible=true; 

    } private   void   notifyIcon1_Click(object   sender,   System.EventArgs   e) 

    if(this.WindowState==System.Windows.Forms.FormWindowState.Minimized) 

    this.Visible=true; 
    this.WindowState=System.Windows.Forms.FormWindowState.Normal; 
    this.notifyIcon1.Visible=false;