private void replaceTextToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (rtbText.Text != "")
     {
         if (rtbText.SelectionLength > 0)
         {
             ReplaceForm rfrm = new ReplaceForm();
             if (rfrm.ShowDialog() == DialogResult.OK)
             {
                 rtbText.SelectedText = Replacetext;
             }
         }
         else
         {
             MessageBox.Show("Mark the text, you want to replace and continue!");
         }
     }
     else
     {
         MessageBox.Show("There is no text to replace");
     }
 }
Exemple #2
0
 private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ReplaceForm f = new ReplaceForm(richTextBox1);
 }