private void btnShowImg_Click(object sender, EventArgs e) { using (var dialog = new ShowImageForm(txtImgUrl.Text)) { dialog.ShowDialog(); } }