I am using vb 2010 express. I have setup a windows form with 12 labels. I have made it so that when a label is clicked it will change color to show that it is selected. When 2 are selected I will check to see if they match.
I am going to populate these labels with words and definitions from a text file. There will be two columns. One for the word and one for the definition. right now I am able to set the contents of the label with the following code
The problem I'm having is that I can't come up with a way to put the words and answers into a random order. I want label2 - label7 (in column 1 on the form) to contain the words, and label8 - label13 (in column2 on the form) to contain the definitions. Here is a picture of the form:
Any ideas on how to accomplish this?
I am going to populate these labels with words and definitions from a text file. There will be two columns. One for the word and one for the definition. right now I am able to set the contents of the label with the following code
Code:
For Each myControl As Control In Me.Controls
If TypeOf myControl Is Label And Then
CType(myControl, Label).Text = "word"
End If
Next myControl
The problem I'm having is that I can't come up with a way to put the words and answers into a random order. I want label2 - label7 (in column 1 on the form) to contain the words, and label8 - label13 (in column2 on the form) to contain the definitions. Here is a picture of the form:
Any ideas on how to accomplish this?