----------------------------------- Tony Thu Aug 28, 2003 2:43 pm tic tac toe ----------------------------------- this is one of my very first Visual Basic programs. It sucks since I didn't know VB all that well back then. Since then I've made some better versions of the game (once compsci grade below me got it as their final project assignment... *sigh*) ----------------------------------- the_short1 Sun Mar 28, 2004 5:17 pm ----------------------------------- bsic yet effective tic tac tow...... yes u must have been a real noob hen u made this,.., im sure u could do a lot better..... anyways... for its size(10 KB) that is AMAZING!!! i love VB because u can compile ur pictures into the program and stuff... tahts COOl!!!!! now i want to learn VB too... dam... so much do to over summer... ----------------------------------- Pat Thu Apr 06, 2006 10:14 am ----------------------------------- This was fun. The X's and O's are kind of skinny, and a little hard to see. Maybe colour and a bold font would help? I'm new to visual basic, so I don't know how to change the program yet. But good job! ----------------------------------- Andy Thu Apr 06, 2006 12:01 pm ----------------------------------- why do people not read the rules? when you reply to a topic that is almost three years old, that's called necroposting, and is against compsci.ca's policy... ----------------------------------- tifg Thu Dec 21, 2006 2:18 pm ----------------------------------- posting now wouldn't be more than 3 yrs old.. so here goes how did u get the variables to remember its values across cmd boxes? ie. >>>>in the "new game" cmd box turn = "p1" >>>>in another cmd box tahts sopposed to display either X or O depending on the player order if turn = "p1" then cmd1.caption = "X" else cmd1.caption = "O" end if the trouble for me now is taht the turn variable gets cleared across the cmd boxes... so it would go to the else statement everytime... idont kno if this matters anything but i changed the "private sub to public sub nd it didnt do netin... ----------------------------------- Tony Thu Dec 21, 2006 2:22 pm ----------------------------------- make sure your variables have the correct scope. Those decleared inside one function or subroutine will not be visible from another. You'd need something more... global. ----------------------------------- tifg Thu Dec 21, 2006 2:36 pm ----------------------------------- make sure your variables have the correct scope. Those decleared inside one function or subroutine will not be visible from another. You'd need something more... global. lol.. what EXACTLY do you mean by global? im listening ----------------------------------- Tony Thu Dec 21, 2006 4:26 pm ----------------------------------- I mean that something like player turn should be accessable by every function, so you would want to declear that at the very top of your source file, outside of any particular sub. ----------------------------------- cool dude Thu Dec 21, 2006 4:36 pm ----------------------------------- or off course make a module :wink: ----------------------------------- tifg Thu Dec 21, 2006 7:22 pm ----------------------------------- alright... this wut i got so far, been workin on it for abt 40 mins... a TON of copy nd pasting.. but theres a couple major problems tho i don kno hwo to fix... its very easy to find the problem so ill jux post this thing nd see if you guys can help me out... ----------------------------------- Tony Thu Dec 21, 2006 8:12 pm ----------------------------------- well don't look at me, I haven't been coding VB since... *looks at his original post* 2003 it appears. Heck, I don't even have Windows anymore, score! ----------------------------------- cool dude Thu Dec 21, 2006 8:18 pm ----------------------------------- copy and paste is bad because you won't understand a lot of the code your writing. anyhow u have quite a bit of problems starting with u can double click on the same button and it will switch from X to O. to fix this you can disable the button. but i'll make your life much much easier by telling you to use control arrays. basically make one button name it something than copy and paste all your other buttons. this will be much easier and a lot more efficient. if you don't take my advice and continue your going to get really screwed up and it will take you hundreds of lines of code to make when you can make it under 50 lines ----------------------------------- cool dude Thu Dec 21, 2006 8:44 pm ----------------------------------- Here i started you off on the control array.