老师让我们用c#来写一个记事本,可是我的查找功能总是做不出来!!请高手帮我指点下
------解决方案--------------------------------------------------------
- C# code
Form1 f1=(Form1)this.Owner; if(this.textBox1.Text.Length>0) { index=f1.richTextBox1.Text.IndexOf(this.textBox1.Text,index); if(index==-1) { MessageBox.Show("未查找到相关内容"); index=0; } else { f1.richTextBox1.Select(index,this.textBox1.Text.Length);//把查找到的内容选中,调用Select()方法 index=index+this.textBox1.Text.Length; f1.Activate(); } }//我QQ:294649324