Question[Help]Text File scroll down

Posts 14 of 4 · Page 1 of 1
[Help]Text File scroll down
Basically how would you write a code to view the bottom of a text file.

For example

Notepad
text
text
text
--------------
text
text1

How would you scroll down to view text1.
well, that will be a lot of code if you want NOTEPAD to scroll down, i know it is possible, but it is harder than to scroll down a rich text box.
Do you mean:

You got a textfile saved anywhere, let's say desktop.
You want to load every single line into your comx/listbox?

Or simple just add scrollbars.
hmmm really not complex guys....

If the file will always have the same first word then you could seek an appropriate length before the end

then use some of my string manipulation in my tutorials section, and your good to go

[php]
Dim SR As New StreamReader("location Of text\textfile.txt")

Dim LL As String
Dim FW As String = "First Word"' whatever the first word is.
sr.BaseStream.Seek(-1000, SeekOrigin.End)'-1000 is the byte length to search, increase or decrease as needed

LL = sr.ReadToEnd

LL = LL.Substring(LastLines.IndexOf(FirstWor))

Textbox1.text = LL

[/php]

It may need some further manipulation, but it is easily accomplishable with other methods as well

Unless you mean something entirely different.

Posts 14 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?