我用这样的代码却不行呢?
private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)
{ Point p = new Point(e.X,e.Y);
if (dataGridView1.CurrentRow.Index == 5)
{
selEmploye ee = new selEmploye();//新窗体
ee.ShowDialog();
ee.DesktopLocation = p;
}}
也就是在点击Index是5的位置,显示窗体
private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)
{ Point p = new Point(e.X,e.Y);
if (dataGridView1.CurrentRow.Index == 5)
{
selEmploye ee = new selEmploye();//新窗体
ee.ShowDialog();
ee.DesktopLocation = p;
}}
也就是在点击Index是5的位置,显示窗体
ee.DesktopLocation = p;
ee.ShowDialog();