The simple calculator, the cryptogram and the full hangman code samples by vb6.us are three examples of Visual Basic code. All three are available for free as Visual Basic solutions.
The simple calculator mimics the interface of the built-in calculator of Windows. It can handle additions, subtractions, multiplications, subdivisions and percentages. The code also features functionality to delete numbers, reset the calculator and handle square calculations. It lacks the M keys featured on some calculators.
The cryptogram is a game where the player must reveal an encoded message. The game replaces the letters of a random proverb, quotation or maxim with other letters of the alphabet. The code example includes components to show game instructions, reveal the solution of an encryption and start a new game. When the user types into a box, the game also moves the typing cursor to the next box. The application accepts both mouse and keyboard input.
The hangman code example recreates the famous hangman game in Visual Basic. The game has a splash screen that greets users, offers a colorful interface and can work with multiple files. The code example uses simple line controls to display the gallows and draws the hangman in six body parts. The game can also save user progress and load previous games.