Introduction: Tic Tac Toe in Visual Basic
Tic Tac Toe is one of the most popular time pass game. Especially in class rooms ;). In this instructable we are gonna design this game in our PC using popular GUI programming platform, visual basic.
Step 1: Make Sure You Have These in PC !
1) Microsoft Visual Studio not older than 2010.
2) Windows operating system 32-bit /64-bit.
Step 2: Visual Studio
1) Start new project in Visual studio with Visual Basic, Windows Form Application.
2) Create the above form template:
- Label names are very important. Name each cell in 3x3 as - Label 1 to 3, Label 4 to 6, and Label 7 to 9 from left to right.
- Name the Reset Game button as button 1.
- Create Menu Strip with Game -> About TicTacToe (as sub menu).
- Set the form properties : Form1, fixed , locked, center aligned , no maximise button, set icon and text.
Step 3: Start Coding !!!
Now you are ready to code !!
- Double click on the Form ( Form1)
- Delete all the default code there. UnRAR the attached file and just copy paste the contents of code there.
- Save, Debug and Release !!
Note: on click message box function in the code may need edits of your own as the name of message box may be different in my code. Also the setup for the game has been attached for your reference.
We have a be nice policy.
Please be positive and constructive.