I send name of opened form to datagridview in formload. Then when I double click row of this datagridview, I want to activate the form again. But I cannot use this method. What do you prefer?
` private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
int i = dataGridView1.CurrentRow.Index;
string fname = dataGridView1.Rows[i].Cells[1].Value.ToString();
var type = Type.GetType("ProMod." + fname);
var openthisform = Activator.CreateInstance(type) as Form;
Application.OpenForms.OfType<Form>().First(f => f is openthisform).Activate();
}`
If you have already opened the form and know its name then you just need to retrieve it from the Application.OpenForms using the name string