Beispiel #1
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FindForm f1 = new FindForm();

            f1.ShowDialog();
            if (f1.getFindWord() != "")
            {
                int index = 0;
                while (index != -1 && index < textBox1.Text.Length)
                {
                    index = textBox1.Text.IndexOf(f1.getFindWord(), index);
                    if (index != -1)
                    {
                        textBox1.Select(index, f1.getFindWord().Length);

                        index++;
                        f1.ShowDialog();
                    }
                }
            }
        }
Beispiel #2
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FindForm frm = new FindForm();

            if (frm.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }
            blank form = (blank)this.ActiveMdiChild;

            form.MdiParent = this;
            int start = form.richTextBox1.SelectionStart;

            form.richTextBox1.Find(frm.FindText, start, frm.FindCondition);
        }