www.codeproject.com有,自己去下,不行我发个给你

解决方案 »

  1.   

    ETStudio:你给我的那个基本功能是能够实现,但是在没激活时,当我想要激活时,需要用鼠标点击一下才能激活,而QQ不用,它是实时捕获鼠标的,这个怎么实现呢?
      

  2.   

    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.Threading;
    隐藏/显示窗体线程:可扩展此方法达到你想要的效果
    public void hide()
    {
    while(true)
    {
    if ((this.Top<=0) & ((MousePosition.X<=this.Left)|(MousePosition.X>=this.Left+this.Width)|(MousePosition.Y>this.Top+this.Height)))
    {
    this.Top=-this.Height+2;
    }
    if ((MousePosition.Y==0) & (MousePosition.X<=(this.Left+this.Width)) & (MousePosition.X>=this.Left))
    this.Top=0;
    }
    }调用线程:
    private void Form1_Load(object sender, System.EventArgs e)
    {
      Thread th=new Thread(new ThreadStart(hide));
      th.Priority=ThreadPriority.Lowest;//使线程不影响系统操作
      th.IsBackground=true;//退出系统时关闭线程
      th.Start();
    }