日期:2014-05-17 浏览次数:20800 次
private void lvTeacher_RightClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lvTeacher.SelectedItems.Count > 0)
{
cmsEdit.Show(lvTeacher, e.Location);
}
}
private void listView1_MouseDown(object sender, MouseEventArgs e)
{
ListViewHitTestInfo li = lvTeacher.HitTest(e.Location);
if (e.Button == MouseButtons.Right && li.Item!=null)
{
cmsEdit.Show(lvTeacher, e.Location);
}
}