private void replaceToolS_Click(object sender, EventArgs e) { a = new Form2(); a.setA(this, 1); a.Show(); if (txtBox.SelectedText != "") { a.setFindText(txtBox.SelectedText); } }