const int SW_SHOWNOACTIVATE = 4;
        [DllImport("User32.dll", CharSet = CharSet.Auto)]
        public static extern int ShowWindow(IntPtr hWnd, short cmdShow); 
        public void ScrollShow()
        {
            this.Width = widthMax;
            this.Height = 0;
            this.Show();        
            ShowWindow(this.Handle, SW_SHOWNOACTIVATE);
            this.timer1.Enabled = true;
        }    已有这  API可以在大多熟软件窗体不抢焦点,但在web下,焦点有被这窗体抢占 如MSN的新消息,QQ传文件提示。

解决方案 »

  1.   

    下列代码可以实现你的需求,当你构造好一个Form后,不要直接Show它,用WindowsAPI来Show:   
        
      using   System.Runtime.InteropServices;   
      ......   
      const   int   SW_SHOWNOACTIVATE       =   4;   
      [DllImport("User32.dll",   CharSet=CharSet.Auto)]   
      public   static   extern   int   ShowWindow(IntPtr   hWnd,   short   cmdShow);   
      ......   
      private   void   button4_Click(object   sender,   System.EventArgs   e)   
      {   
        Form2   frm   =   new   Form2();   
        ShowWindow(frm.Handle,   SW_SHOWNOACTIVATE);   
      }
      

  2.   

    简单点实现:        private void button2_Click(object sender, EventArgs e)
            {
                Form1 fm = new Form1();
                fm.Show(this);//正常show
                fm.Owner.Focus();//将焦点移到父窗口
                
            }