Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
VB
For j As Integer = 0 To RichTextBox1.Lines.Length - 1

           Dim lines() As String = Me.RichTextBox1.Lines
           RichTextBox1.SelectedText = lines(j).IndexOf("http")
           RichTextBox1.SelectionLength = (30)

           RichTextBox2.Text = RichTextBox1.SelectedText.ToString



       Next


i want to copy all lines in richtextbox1 contain word "http", i follow this code but it showing different error.
can anyone suggest other code or help in this code :)
Posted
Comments
Sergey Alexandrovich Kryukov 28-Mar-13 23:27pm    
"Different error..." is not informative.
—SA
important17 28-Mar-13 23:33pm    
firstly it was showing "-1 out of bourdaries"
now it showing "Index was outside the bounds of the array."
Sergey Alexandrovich Kryukov 28-Mar-13 23:37pm    
Do I have to pull every detail from you? In what line...
—SA
Sergey Alexandrovich Kryukov 28-Mar-13 23:38pm    
Look, such programming cannot work anyway (I don't say your code, programming in general). What is the world constant 30? No way...
—SA
sariqkhan 29-Mar-13 1:06am    
sir can you help me here please if you can
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu

1 solution

Check here there are many methods of find a text in richtextbox

http://msdn.microsoft.com/en-us/library/3134f2f7%28v=vs.71%29.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900