private void button2_Click(object sender, EventArgs e) { IEmail email = GetEmail(); var sendTo = new SendTo(); sendTo.Closed += (s, args) => { logForm.Show(); SendEmail(email, sendTo.EmailAddress); }; sendTo.ShowDialog(); }