用如下两句只能最小化窗体:
this.ShowInTaskbar = false;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
如何作才能让托盘程序启动就隐藏界面呢?请大侠指点...
this.Hide(); 
this.Visable = false;
这些我都尝试过..

解决方案 »

  1.   

    你在form_load时添加一句:
    this.WindowState=FormWindowState.Minimized;
      

  2.   

    private void Form1_Load(object sender, System.EventArgs e)
    {
    this.Region = new Region(new RectangleF(0,0,0,0)); }
      

  3.   

    this.ShowInTaskbar = false;
    this.Hide();这两句就够了。
      

  4.   

    this.WindowState=FormWindowState.Minimized;
      

  5.   

    记得注意不要在 InitializeComponent() 方法里设置 ShowInTaskbar 属性
      

  6.   

    winxieddd(一剑飘香(找工作))  兄:看你的方法也是把窗体重绘为0,不是很合理的方法.
     xrascal(横刀夺爱) :用你的方法启动是看不到窗体,但是用ATL+TAB健切换的时候就会切换出窗体阿!
    有没有试过启动能绝对隐藏,用ATL+TAB健都看不到有进程,就象诺顿启动一样,只有托盘,没有启动界面....
      

  7.   

    InitializeComponent();
    this.ShowInTaskbar = false;
    this.Hide();
    this.Visible = false;
    我已经这样尝试过了,还是能用ALT+TAB健能看到运行的进程图标,如何让ATL+TAB健都切换激活不了呢?
      

  8.   

    Some body can help me!!!
      

  9.   

    试试
    this.Hide();
    this.ShowInTaskbar = false;
      

  10.   


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

  11.   

    楼上的,你会了不代表对别人不难阿
    何况,我想这个你没有实际动手,你就确定我问的问题很小儿科吗?
    this.ShowInTaskbar = false; 该值指示是否在 Windows 任务栏中显示窗体。我是知道的,但是使用ALT+TAB健还是可以切换呼出Form的.... 如何作让这两个健都切换不出Form界面这才是我问的核心...
    顺便谢谢真心帮助解决问题的哥们!
      

  12.   

    /// <summary>
    /// 显示隐藏窗口
    /// </summary>
    /// <param name="isShow"></param>
    private void ShowHideWindow(bool isShow)
    {
    if(isShow)//显示
    {
    if(this.WindowState == FormWindowState.Minimized)
    {
    this.WindowState = FormWindowState.Normal;
    }
    if(this.ShowInTaskbar==false)
    {
    this.ShowInTaskbar = true;
    this.Show();
    }
    this.Activate();
    }
    else//隐藏
    {
    if(this.WindowState == FormWindowState.Maximized)
    {
    this.WindowState = FormWindowState.Normal;
    }
    if(this.ShowInTaskbar == true)
    {
    this.Hide();
    this.ShowInTaskbar = false;
    }
    }
    }
      

  13.   

    在InitializeComponent中
    {
    this.ShowInTaskbar = false;
    this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
    this.Load += new System.EventHandler(this.***_Load);
    }
    private void ***_Load(object sender, System.EventArgs e)
    {
    this.Visible = false;
    }这样,你就无法任务拦中看到了.