void Modeless_Accept(object sender, EventArgs e) { ModelessFormDialog mld = sender as ModelessFormDialog; MessageBox.Show(mld.Text); mld.Close(); }
private void tsmiModelessDialog_Click(object sender, EventArgs e) { ModelessFormDialog mld = new ModelessFormDialog(); mld.Accept += Modeless_Accept; mld.Show(); }