private void contextFileInfo_Click(object sender, EventArgs e) { int cc = dataGridView1.CurrentCell.RowIndex; xy = gPath.Text + "\\" + dataGridView1.Rows[cc].Cells[0].Value.ToString(); ImageFileInfo form = new ImageFileInfo(); form.ShowDialog(); }