Step 9: Try Other Features
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
To learn more, try changing icons and colors, adding a game timer, and adding sounds. To make the game more challenging, try making the board bigger and adjusting the timer.
To try other features
Replace the icons and colors with ones you choose.
Tip
Try looking at the label's Forecolor property.
Add a game timer that tracks how long it takes for the player to win.
Tip
To do this, you can add a label to display the elapsed time on the form above the TableLayoutPanel, and add another timer to the form to track the time. Use code to start the timer when the player starts the game, and stop the timer after they match the last two icons.
Add a sound when the player finds a match, another sound when the player uncovers two icons that don't match, and a third sound when the program hides the icons again.
Tip
To play sounds, you can use the System.media namespace. See Play Sounds in Windows Forms App (C# .NET) or How To Play Audio In Visual Basic for more information.
Make the game more difficult by making the board bigger.
Tip
You'll need to do more than just add rows and columns to the TableLayoutPanel – you'll also need to consider the number of icons you create.
Make the game more challenging by hiding the first icon if the player is too slow to respond and doesn't choose the second icon before a certain amount of time.
To continue or review
If you get stuck or have programming questions, try posting your question on one of the MSDN forums. See Visual Basic Forum and Visual C# Forum.
There are great, free video learning resources available to you. To learn more about programming in Visual Basic, see Visual Basic Fundamentals: Development for Absolute Beginners. To learn more about programming in Visual C#, see C# Fundamentals: Development for Absolute Beginners.
To return to the previous tutorial step, see Step 8: Add a Method to Verify Whether the Player Won.