我设置好右键菜单以后,怎么样获取右键点击的是哪一单元格 Point p = new Point(contextMenuStrip1.Left, contextMenuStrip1.Top); for (int r = 0; r < dataGridView1.RowCount; r++) { for (int c = 0; c < dataGridView1.Columns.Count; c++) { Rectangle rect = dataGridView1.GetCellDi
本文实例讲述了C#设置右键菜单的方法。分享给大家供大家参考。具体实现方法如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public par