How many objects are referred to? What are they?
4 objects. 2 buttons and 2 text box
What is the name of the variable referred to?
"secretnum" after Dim
What are the three text options that appear in textbox.2?
higher;lower;correct
What do you think this code does?
youre trying to guess whatever number that the computer has in "mind". you do this by entering a number in textbox1, then clicking button1. then either higher, lower or correct will appear in textbox2. if it says "higher" then you obviously try to guess a number that is higher than whatever you typed in the first place. if it says "lower" then youre trying to guess a number that is lower than the previous number you have entered. if it says "correct" then its correct ;D
Build this code into a project and get it to work!
in addition, that last bit in the codes. the one of the actual form. says Randomize ()..blahblaah. this is so that whenever you "play" it, it will always be a random number from 1 to 10.
also, a fault is that accidentally writing in the textbox.2 you shouldnt be able to do that. that textbox.2 should therefore be a label.
No comments:
Post a Comment