3 Replies - 3658 Views - Last Post: 29 April 2008 - 01:33 PM Rate Topic: -----

#1 guivarch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-April 08

ComboBox populating with each line of a text file

Post icon  Posted 29 April 2008 - 01:11 PM

Very new to VB and have hit a brick wall with an applicaiton

I need my combobox contorl to add each line of a text file as an item to the combobox when the application starts so it is populated for the user. Have been searching the webfor solutions and this is the first time i have turnt to a forum. Dont really know the best approach to take. Some tutorials i have looked at refer to VB6 and this is leads to even more confusion for me.

Would the approach be something to do with array?

Any help would be greatly appreciated. Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: ComboBox populating with each line of a text file

#2 guivarch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-April 08

Re: ComboBox populating with each line of a text file

Post icon  Posted 29 April 2008 - 01:22 PM

Very new to VB and have hit a brick wall with an applicaiton

I need my combobox contorl to add each line of a text file as an item to the combobox when the application starts so it is populated for the user. Have been searching the webfor solutions and this is the first time i have turnt to a forum. Dont really know the best approach to take. Some tutorials i have looked at refer to VB6 and this is leads to even more confusion for me.

Would the approach be something to do with array?

Any help would be greatly appreciated. Thanks
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: ComboBox populating with each line of a text file

Posted 29 April 2008 - 01:31 PM

guivarch,

Look into the StreamReader Class, particularly the ReadLine() Member and the Peek() Member.

Once you have read up on those, give populating your ComboBox within a loop using ReadLine, then if you run into problems post the code you're having a problem with, inside code blocks like so :code: and a detailed description/explanation of what is going wrong, any error messages you're receiving.
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: ComboBox populating with each line of a text file

Posted 29 April 2008 - 01:33 PM

Please don't be making duplicate threads regarding the same question. Doing this will not get you help any faster. Please refer to the Forum Rules regarding this behavior and other rules of the community :)

Merged!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1