I'm using Visual Studio 2005 so I didn't know where to put this topic.
This is my problem.
I made a qucik search program so when I browse for a text file, it adds that text file to a listbox1. And then when you search result will be placed in listbox2
Now I'm wondering how to force the program to automaticly load last opened text file on startup.
I tried with this and then I stuck.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim reader As IO.StreamReader = _ New IO.StreamReader(winDir & "\system.ini") Try Me.ListBox1.Items.Clear() Do Me.ListBox1.Items.Add(reader.ReadLine) Loop Until reader.Peek = -1 Catch Me.ListBox1.Items.Add("File is empty") Finally reader.Close() End Try End Sub
I don't even know if this is good.