VB.NET ComboBox & Statusbar HELP!

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2007
Posts: 2
Reputation: ScatterMap is an unknown quantity at this point 
Solved Threads: 0
ScatterMap ScatterMap is offline Offline
Newbie Poster

VB.NET ComboBox & Statusbar HELP!

 
0
  #1
Apr 26th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 121
Reputation: manal is an unknown quantity at this point 
Solved Threads: 17
manal's Avatar
manal manal is offline Offline
Junior Poster

Re: VB.NET ComboBox & Statusbar HELP!

 
0
  #2
Apr 27th, 2007
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

  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
"give only what u willing to receive "
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC