日期:2014-05-17 浏览次数:21172 次
  protected override void WndProc(ref Message m)
  {
   if (m.HWnd == this.Handle && m.WParam==this.panel1.Handle)//这里怎么判断当前处理的是panel1
   {
    //textBox1.Text = textBox1.Text + "\r\n" + DateTime.Now.ToString();
    if (m.Msg == 0X200) //第一次处理鼠标的消息,我把它当做鼠标进入处理
    {
     button1.Visible = true;
    }
    if (m.Msg == 0X2A3)//鼠标离开
    {
     button1.Visible = true;
    }
   }
   base.WndProc(ref m);
  }