944,028 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 6529
  • VB.NET RSS
Apr 26th, 2007
0

VB.NET ComboBox & Statusbar HELP!

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ScatterMap is offline Offline
2 posts
since Apr 2007
Apr 27th, 2007
0

Re: VB.NET ComboBox & Statusbar HELP!

Quote ...
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.
Quote ...
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

VB.NET Syntax (Toggle Plain Text)
  1. If arr.Length >= 25 Then
  2. count = 25
  3. Else
  4. count = arr.Length
  5. End If
  6.  
  7.  
  8. Do While count > 0
  9. count = count - 1
  10. ComboBox1.Items.Add(arr(count))
  11.  
  12. Loop
Reputation Points: 37
Solved Threads: 17
Junior Poster
manal is offline Offline
122 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: VB.Net Combobox Reverse Order
Next Thread in VB.NET Forum Timeline: Connecting to a SQL server on another XP computer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC