Alright so I have a school assignment where I have to create a group box with two Radio Buttons, one for Boys, one for Girls. I then have to create a list box which will list the names of the boys or girls, depending on which Radio button is selected. I can show you a screenshot of what it should look like.
The directions for the assignment say I have to use two parallel arrays to do this. I have created all of the objects on the form, and I have declared the two parallel arrays in the Declaration of the Form, like this:
Question
apreichner
Alright so I have a school assignment where I have to create a group box with two Radio Buttons, one for Boys, one for Girls. I then have to create a list box which will list the names of the boys or girls, depending on which Radio button is selected. I can show you a screenshot of what it should look like.
The directions for the assignment say I have to use two parallel arrays to do this. I have created all of the objects on the form, and I have declared the two parallel arrays in the Declaration of the Form, like this:
' Declare and initialize the name array Dim strNames() As String = {"Joe", "Bill", "Tina", "Lisa", "Tim", "Alan", "Jacob", _ "Emily", "Jose", "Allison", "Charlie", "Joseph", "Erin", "Lindsey", "Dominic", _ "Eric", "Jenna", "Paul", "Kyle", "Dawn", "Cody", "Valarie", "JD", "Michelle", "Ashlei"} ' Declare gender Dim strGender() As String = {"M", "M", "F", "F", "M", "M", "M", "F", "M", "F", "M", "M", _ "F", "F", "M", "M", "F", "F", "M", "F", "M", "F", "M", "F", "F"}But now I'm a little stumped now. How do I sort the parallel arrays and display them in the listbox alphabetically?
Link to comment
Share on other sites
21 answers to this question
Recommended Posts