private void edit_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { edit_form.Show(); edit_form.ClearText(); this.Hide(); edit_form.Owner = this; } else { MessageBox.Show("Выберете элемент"); } }
private void button8_Click(object sender, EventArgs e) { EditForm fo = new EditForm(); fo.Show(); }