C# 鼠标事件弹框

时间:2022-02-10 05:02:12

if (e.Button == MouseButtons.Right)

{

if (gridView1.GetFocusedRowCellValue("color").ToString() == "1" || gridView1.GetFocusedRowCellValue("color").ToString() == "5" || gridView1.GetFocusedRowCellValue("color").ToString() == "4")

{

FrmHongKaoCheck f = new FrmHongKaoCheck();

f.labBoxCode.Text = gridView1.GetFocusedRowCellValue("BoxCode").ToString();

f.Location = Control.MousePosition;

f.ShowDialog();

gridView1.SetFocusedRowCellValue("checkType", f.OBJ);

if (f.OBJ != null)

gridView1.SetFocusedRowCellValue("sel", 1);

}

        }