-
How do you read from a richtext box line by line???
For example get a line from a richtextbox add it to a string
say named Fly so my program could check that string, and the get the next line and make the string named Fly this new line so I could check that and so until the end of the rich text box?
-
It depends whether you want to use rich text or not. Often this control is use for normal text in which case you can split the string into an array of lines
(Not debugged at all)
Dim StrLines() As String
StrLines = Split(RTFBox.Text, VbCrLf)
This way UBound(StrLines) will give you the line count (array size)
BUT if you're using RTF (RTFBox.RTFText ??) then the newline is an RTF code so you'll have to deal directly with the RTF code (not very fun)
-
This site has a good article about using the API to get line #, line text, # of lines in a textbox, etc. It's called Extending The TextBox Control. The API calls will work with a RichTextBox also. :D