Re: populating cboBox using txtFile

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 06/05/04


Date: 05 Jun 2004 21:59:32 +0200


* Shannon D via .NET 247 <anonymous@dotnet247.com> scripsit:
> Hi, I am havent been programming for very long and I have run into a
> bit of a snag! I am working on a form in VB.Net that the user inputs
> data and the information is saved to a text file which can also be
> reopened... How do you take information from a textfile and display it
> in a combobox? and can you populate the DateTimePicker?

Reading a text file line-by-line:

\\\
Imports System.IO
.
.
.
Dim sr As StreamReader = _
    New StreamReader("C:\WINDOWS\WIN.INI")
Do While sr.Peek > -1
    Me.ComboBox1.Items.Add(sr.ReadLine())
Loop
sr.Close()
///

-- 
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Relevant Pages

  • Estimated Time
    ... overall study for these exams take forever! ... I havent done much programming ... >I want to get back into Programming, ... >finished the book Dietel & Dietel but havent done any ...
    (microsoft.public.cert.exam.mcad)
  • Re: Saving data
    ... just recently started programming so im new at this stuff but the only ... i havent been able to figure out the code to do is save the data. ... saving in a spreadsheet. ... the dotnet variety, you should be asking in a ...
    (microsoft.public.vb.general.discussion)
  • Re: Kernighan and Pikes "Beautiful" Code
    ... No they havent. ... Move on please, your boring us, it is not programming. ... your own comment on the "efficiency numbers" has already said quite enough ...
    (comp.programming)
  • Estimated Time
    ... i used to be a java/servlet ... I havent done much programming ... I want to get back into Programming, ... finished the book Dietel & Dietel but havent done any ...
    (microsoft.public.cert.exam.mcad)
  • Compressing duplicates?
    ... I've run into a bit of a snag on a really simple problem. ... Aaron W. Hsu ... Programming is just another word for the lost art of thinking. ...
    (comp.lang.apl)