Data from external file
-
I would like to create a external text file or .inf file to hold the list for a combobox. Any help or direction would be great. 1. Out of clutter, find simplicity. 2. From discord, find harmony. 3. In the middle of difficulty lies opportunity. Albert Einstein three rules of work
-
I would like to create a external text file or .inf file to hold the list for a combobox. Any help or direction would be great. 1. Out of clutter, find simplicity. 2. From discord, find harmony. 3. In the middle of difficulty lies opportunity. Albert Einstein three rules of work
You might want to check out the FileStream[^] class. There's plenty of examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
You might want to check out the FileStream[^] class. There's plenty of examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks for the directions I did this Imports system imports system.io then in the form load Try ' Create an instance of StreamReader to read from a file. Dim sr As StreamReader = New StreamReader("MyFile.txt") Dim line1 As String ' Read and display the lines from the file until the end ' of the file is reached. Do line1 = sr.ReadLine() ComboBox3.Items.Add(line1) Loop Until line1 Is Nothing ComboBox3.Items.Add(sr) sr.Close() Catch Er As Exception ' Let the user know what went wrong. Console.WriteLine("The file could not be read:") Console.WriteLine(Er.Message) End Try 1. Out of clutter, find simplicity. 2. From discord, find harmony. 3. In the middle of difficulty lies opportunity. Albert Einstein three rules of work