I have four buttons. The idea is that I read 4 lines (individual words) and assign them each to a button. The program is a multiple choice question/answer where one button holds the correct answer and the other three hold wrong answers. I want to know how I would assign the four words to a random button (Buttons 2, 3, 4, 5) so that the 'correct' button is not one button specifically.
For example...
Dim word1, word2, word3, word4 as string
word1="Hello"
word2="World"
word3="This"
word4="Computer"
Dim answer as String = word2
How would I go about assigning these variables, word1
, word2
, word3
, and word4
to four different buttons, assumed to be named Button2
, Button3
, Button4
, and Button5
?
Thanks in advance for help.
Aucun commentaire:
Enregistrer un commentaire