I'm not the best at explaining things, but I'll do the best I can.
First set up the text file that will hold all the data just like I showed in my last post. Then design your app.
Are you using a book, course or what to go by to learn VB.NET?
you are going to use arrays in this project. For example I have 9, (8 string, 1 integer)
Private _strPicName(42) As String
I have 4 other variable also string used in storing filename of image, filename of text file, application path, and modified app path.
purpose of the app path is that no matter where you deploy it, it will be fine
AppPath = My.Application.Info.DirectoryPath
In the Form_Load section
declare the following variables:
Dim objReader as StreamReader
AppPath = My.Application.Info.DirectoryPath
two counters intCount, intFill and initialize both to zero
(I included a file not found error message, but isn't necessary for operation of program)
(put all pics, txt file in resources folder in solution explorer)
remember the application path and the modified app path variables declared earlier
modifiedapppath = mid(appPath, 1, appPath.IndexOf("\bin\"))
we have to do this to take out \bin\ at end of path because we will be adding \Resources\and text file or image later
Next setup an If statement to check if text file exist.
If it doesn't we need to show an error message and close the app, otherwise, contine with a While statement to read the text file until no more can be read into the arrays and as with any loop don't forget the counter to prevent infinite loop.
When done with this loop close the SreamReader
Next we need to do something with the data extracted from the text file
here I opted to start with filling the combobox with the presidents name
then from there things change from Form_Load to ComboBox1_SelectedIndexChanged event
in this event declare more variables
a selected variable for the selected item since each item is a number
this is an integer
also I have 4 message variables all string
initialize selected to combobox1.selectedIndex
setup if statement
since no president is selected in the beginning
if intSelected greater than -1
do the following
this example
initialize age label = age array (intSelected)
do this for each textbox, label or whatever control you are using
This should get you started
if any of this is seems confusing
you can start it and let me know how far you got, or tell me what you need help with and I'll try to explain it better.
unimac