private void dataGridView1_DoubleClick(object sender, EventArgs e) { try { int index = dataGridView1.CurrentRow.Index; for (int i = 0; i < dataGridView1.ColumnCount; i++) { dataGridView1.Rows[index].Cells[i].Selected = true; } string code = dataGridView1.Rows[index].Cells[6].Value.ToString(); CodePage cp = new CodePage(this, dataGridView1.Rows[index].Cells[0].Value.ToString(), code, dataGridView1.Rows[index].Cells[1].Value.ToString(), dataGridView1.Rows[index].Cells[3].Value.ToString(), dataGridView1.Rows[index].Cells[2].Value.ToString() ); Clipboard.SetDataObject(code); cp.Show(); } catch { } }