日期:2014-05-17  浏览次数:21170 次

C#pictureBox的mousemove事件

  private void pictureBox2_MouseClick(object sender, MouseEventArgs e)
  {
  m_bOperatorLog = false;
  m_bUser = false;
  m_OpenDoor = false;
  m_FiDoor = false;
  Point pt = e.Location;
   
  TreeNode node = dlgSearchTree.treeSearch.GetNodeAt(pt);
  if(node == null)
  {
  return;
  }
  if (node != null)
  {
  dlgSearchTree.treeSearch.SelectedNode = node;
  }
  if (node.Text == "开门记录查询")
  {
  LoadOpenDoorRecord(1);
  }
  else if (node.Text == "识别记录查询")
  {
  LoadFiRecord(1);
  }
  else if (node.Text == "操作记录查询")
  {
  LoadOperateLogReport(1);
  }
  else if (node.Text == "员工查询")
  {
  LoadUser(1);
  }
  }

进入程序,点击界面,mousemove事件有时候不触发,在这里下断点,有时候不进这个事件,这是为什么?

------解决方案--------------------
哪有你那个MouseMove事件,你这不是MouseClick吗