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
3 Replies - 3171 Views - Last Post: 29 April 2008 - 01:33 PM
Replies To: ComboBox populating with each line of a text file
#2
Re: ComboBox populating with each line of a text file
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
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
#3
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
and a detailed description/explanation of what is going wrong, any error messages you're receiving.
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
#4
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!
Merged!
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|