像QQ一样鼠标移到那窗体就出来 求代码 在等

解决方案 »

  1.   

    http://topic.csdn.net/u/20090905/11/71797133-d016-4ddb-821a-662d078c0138.html?47766
    http://topic.csdn.net/u/20090623/12/226db2d9-a458-4126-b8b6-f36738d15689.html
      

  2.   

    简单点说,就是当鼠标移动到窗体上时及移开窗体时,改变窗体的location,可以为负数。计算好size就可以了。另外,窗体靠边停靠时,要留些部分。
      

  3.   

    http://www.cnblogs.com/Red_angelX/archive/2008/07/04/1235377.html
    无标题栏的可能不行
      

  4.   

    为了你我还特意安装了QQ。你注意下。QQ还是露了个小边的呢。当鼠标移动到那个小边上才显示出来的呢。
    当界面在窗体边上的时候,改变size
    当鼠标在那个小边上的时候。改变size
      

  5.   

    #region 贴边的延时检测
               this.timer = new System.Windows.Forms.Timer();
                this.timer.Interval = 50;
               this.timer.Tick += delegate
               {
                    if (this.timer.Interval == 50)
                       this.timer.Interval = 500;
                    else if (this.timer.Interval == 500)
                       this.timer.Interval = 700;
                    else
                    {
                      this.timer.Interval = 50;
                        this.timer.Enabled = false;
                    }               if (this.Left <= 0)
                    {
                       if (this.Bounds.Contains(MousePosition))
                           this.Left = 0;
                        else
                           this.Left = -this.Width + 2;
                    }
                   else if (this.Top <= 0)
                   {
                        if (this.Bounds.Contains(MousePosition))
                           this.Top = 0;
                        else
                           this.Top = -this.Height + 2;
                   }
                    else if (this.Right >= SystemInformation.WorkingArea.Width)
                    {
                        if (this.Bounds.Contains(MousePosition))
                          this.Left = SystemInformation.WorkingArea.Width - this.Width+1;
                       else
                           this.Left = SystemInformation.WorkingArea.Width-1;
                    }
                };
                #endregion