A1VBCode Forums

Code Breaker coding help


http://www.a1vbcode.com/vbforums/Topic11898.aspx

By xShrimp - 6/2/2005

im programming the old fashion game, "Code Breaker", but instead of colored balls on this, there is text box replacing the balls (1=green 2=red 3=blue 4=yellow) well i need a bit of help on this

altho this is for a school project and i need a little bit of help, can u try to limit things down to select case, if then, control arays. this is only a kinda beginners class

1. i need the code so that once i enter a number, for example, 1 = green, if i enter 1 then the textbox backcolor will = to green instantly, and if i delete it then it goes back to white, and so forth for 2,3 and 4

2. i want to code the "check answer button", once they have enter 4 numbers in the textboxes then they click the "check" button, it will chek the answer, see how many is right and is in the right position and store it in a variable, after that display how many is right on that row, then disable the first row and enable the second row, but the other rows will still be diabled. in addition i want to code it so that if one of the textboxes are blank then an error message box will show and tell them to so back and fill it in. i need it so that if all are right in the correct order then it will change forms.

3. i want to have 3 difficulties, easy medium hard. for each difficulty i want a different time limit for each. i placed 3 timers on the game form. i attempted on coding it so one i click easy, then the easy timer will be enabled and running but no success for this and the rest.

i wanna thank you in advance, if u can't understand what this game is then here is a link to where u can play the game for a bit and help me

http://www.insane-games.com/games/code_breaker/

http://www.addictinggames.com/mastermind.html

By istill316 - 6/16/2005

1. Investigate the "Textbox_Change" event

2. I'm not sure what you mean by disabling rows and whatnot.

3. It sounds like you jsut want to change whether or not a certain timer is enabled? Use the Timer.Enabled property. Set it to true for the one you want working, and set it to false for the other ones.