方法如下:
int rst=this.richTextBox1.Find(this.textBox1.Text,System.Windows.Forms.RichTextBoxFinds.None);
判断检测出来的结果:
if (i >= 0)
{
// 标记出所选符合条件的文字
this.richTextBox1.Select(i, this.textBox1.Text.Length);
}
方法如下:
int rst=this.richTextBox1.Find(this.textBox1.Text,System.Windows.Forms.RichTextBoxFinds.None);
判断检测出来的结果:
if (i >= 0)
{
// 标记出所选符合条件的文字
this.richTextBox1.Select(i, this.textBox1.Text.Length);
}