控件的透明部分是不能接收输入的,你的要求恐怕不容易达到,除非使用透明控件下面的控件来触发透明控件的事件

解决方案 »

  1.   

    private void InitializeComponent()
    {
    System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
    // 
    // Form1
    // 
    this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
    this.BackColor = System.Drawing.Color.White;
    this.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BackgroundImage")));
    this.ClientSize = new System.Drawing.Size(192, 96);
    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
    this.Name = "Form1";
    this.Text = "Form1";
    this.TransparencyKey = System.Drawing.Color.White;
    this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
    this.DoubleClick += new System.EventHandler(this.Form1_DoubleClick);
    this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
    this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove); }
    ,,,,,,,,,,,,
    private int beginX;
    private int beginY;
    private bool mousedown;
    [STAThread]
    static void Main() 
    {
    Application.Run(new Form1());
    }
            
    private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
    {

    this.mousedown=true;
    this.beginX=e.X;
    this.beginY=e.Y;
    } private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
    {
    if (this.mousedown)
    {
    this.Left+=e.X-this.beginX;
    this.Top+=e.Y-this.beginY;
    }
    } private void Form1_DoubleClick(object sender, System.EventArgs e)
    {
    Application.Exit();
    } private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
    {
    this.mousedown=false;
    }
    }
    }
    这是是不规则窗体的代码。和你要求的有点像!它可以用FORM的事件!希望对你有帮助!
    透明控件?你可以把你的控件的高,宽设为0就见不到了呀!:)