PROJECT PREVIEW: THE JOKE MACHINE


In this chapter, as in all the chapters to follow, you will learn how to create a computer game using Visual Basic. Simple game projects provide a fun and engaging learning experience while you learn about Visual Basic .NET 2005.

In this first chapter, you will learn how to create the Joke Machine game. The Joke Machine game begins like most other Windows applications, displaying a window that controls the game's execution. Compared to most Windows applications, the Joke Machine game is relatively simple, consisting of just two buttons, a label, and a text box. However, the development of this game will demonstrate powerful programming techniques that make up the foundation of any Windows application.

When first started, the Joke Machine will appear on your desktop as shown in Figure 1.1.

image from book
Figure 1.1: The initial window of the Joke Machine game.

The game is very simple, containing just two buttons, each of which displays a joke and its punch line when clicked. Figure 1.2 shows the first joke displayed by the game.

image from book
Figure 1.2: Viewing the first joke told by the Joke Machine game.

Figure 1.3 shows the joke that appears when the Joke Machine's second button is clicked.

image from book
Figure 1.3: Viewing the second joke told by the Joke Machine game.

By the time you have created and run this game, you'll have learned the five basic steps involved in writing and executing a Visual Basic application.




Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
ISBN: 1592008143
EAN: 2147483647
Year: 2006
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net