当前位置:编程学习 > C#/ASP.NET >>

MouseButtons.Right不起作用

 为什么鼠标左键起作用,右键不起作用,在线等
private void cklist_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                string str;
                CheckedListBox ck = (CheckedListBox)sender;
                string m_tableName = ck.Name;
                //遍历被选中的字段
                for (int i = 0; i < ck.Items.Count; i++)
                {
                    if (ck.GetItemChecked(i))
                    {
                        str = ck.Items[i].ToString();
                       
                    }
                }
            }
        }
--------------------编程问答-------------------- 在MouseUp事件中定义试试看
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,