private void btnAdd_Click(object sender, EventArgs e) { SearchFile SF; SF = new SearchFile(KeyWord); SF.Show(); SF.FormClosed += new FormClosedEventHandler(SF_FormClosed); }
void SF_FormClosed(object sender, FormClosedEventArgs e) { SearchFile SF = (SearchFile)sender; if (SF.Selected != null) { lstObjects.Items.Add(SF.Selected); } }