Hi! I'm a newbie with VB.NET and I'm so close to finished an internet explorer of my own and have come to the following problems:

Whenever i type a URL into the combobox and hit "Go", i have a text box that fetches that URL. Everytime I enter a new URL, the textbox adds a new line and enters the typed URL. The point is to have a hidden (non-visible) textbox save all of the URL's entered in a session and then save them to a text document for "Internet History".

Later on when i open my personal internet explorer again, i have a Streamreader open the text file and load each line into my URL Combobox.

-----------------------------------------------------------
Dim reader As StreamReader = New StreamReader("c:\urls.txt")

Do While reader.EndOfStream = False
combobox.Items.Add(reader.ReadLine)
Loop
reader.Close()
---------

Here's my problem: Lets say i started a new session... I enter a URL it's saved into my text box, then new line....
when the session's closed, the text file is loaded and well...
my first item in the ComboBox is NOT THE LAST ENTRY in my previous session.

I want Index (0) to be the last URL entered.

I cant seem to get the last URL typed to appear on the top of the list.

Can i reverse my Text document using streamreader so that my last line in the text document is loaded into the combobox index 0, then the one before last, index1, etc.??

--------------------------------------------

My other problem is that now that i have a text file with 600 websites i've visited, when the streamreader loads the file, my ComboBox has 600 sites in the list.

How can i have Streamreader load ALL of the lines, but only display 25 in the Combobox?


--------------------------------------------

Statusbar:
How do i get the statusbar to function on "Navigating" to give a true percentage load of the website being load?

At this point my Status bar adds 1 bar every little bit and when the page is done loading, it still adds bars. Then it would stop but not exactly when the page has loaded. I want it to stop when the page has finished loading.

-----------------------------

AND MY LAST QUESTION:

CAN I AVOID .TXT FILES? IS THERE AN EASIER WAY?

PLEASE HELP :(


Any help would be appreciated. PLEAAAASE :(

my first item in the ComboBox is NOT THE LAST ENTRY in my previous session.

I want Index (0) to be the last URL entered.

I cant seem to get the last URL typed to appear on the top of the list.

My other problem is that now that i have a text file with 600 websites i've visited, when the streamreader loads the file, my ComboBox has 600 sites in the list.
How can i have Streamreader load ALL of the lines, but only display 25 in the Combobox?

create array of strings and store in it the lines of text file then do something like this

If arr.Length >= 25 Then
            count = 25
        Else
            count = arr.Length
        End If


        Do While count > 0
            count = count - 1
            ComboBox1.Items.Add(arr(count))

        Loop
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.