在这里有一个问题,就是 
未将对象引用设置到对象的实例。 
大家指点一下,为什么会出现这个原因? 
private void lstview_MouseMove(object sender, MouseEventArgs e) 

lstview.ContextMenu.Show(this.contextMenuStrip1, new Point(e.X, e.Y)); }

解决方案 »

  1.   

    lstview.ContextMenu=this.contextMenuStrip1;
    lstview.ContextMenu.Show(lstview, new Point(e.X, e.Y));   
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/
      

  2.   

    lstview.ContextMenu为空了lstview.ContextMenu=this.contextMenuStrip1; 
      

  3.   

    错误 1
    无法将类型“System.Windows.Forms.ContextMenuStrip”
    隐式转换为“System.Windows.Forms.ContextMenu”
      

  4.   

    lstview.ContextMenuStrip=this.contextMenuStrip1; 
    lstview.ContextMenuStrip.Show(lstview, new Point(e.X, e.Y)); 
      

  5.   

      问题是我想获得这个listview哪一行当中的位置信息,根据我们上下菜单的new point(e.x,e.y)
    这样能确定是哪一行的值吗,并且我要根据弹出菜单的值,来做相应的操作,所以说如何来获取这个列的值,根据上下文菜单。