Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET RichTextBox , +
 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 Smile | :)
Posted 28-Mar-13 17:57pm
Comments
Sergey Alexandrovich Kryukov at 28-Mar-13 23:27pm
   
"Different error..." is not informative.
—SA
important17 at 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 at 28-Mar-13 23:37pm
   
Do I have to pull every detail from you? In what line...
—SA
Sergey Alexandrovich Kryukov at 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 at 29-Mar-13 1:06am
   
sir can you help me here please if you can
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 BillWoodruff 85
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100