PROJECT PREVIEW: THE LOTTERY ASSISTANT GAME


In this chapter, you will learn how to create a Visual Basic game called the Lottery Assistant that is designed to assist users in generating a list of randomly selected lottery numbers. Players will have control over a number of game settings, including the size font used to display game output and the game window's background color.

Different lottery games require the selection of numbers from various ranges. For example, one lottery game may require the selection of numbers in the range of 1 to 44, whereas another may set the range as 1 to 50. In addition, lottery games vary in the number of lottery numbers that must be selected to play. For example, for some games you may need to select five numbers, and for other games you might be required to pick six numbers. Therefore, the Lottery Assistant game provides players with the ability to specify:

  • The range of numbers to select from

  • The number of lottery numbers required to play the lottery game

  • How many sets of lottery numbers they want generated

To play the game, the player must supply the information listed above into text fields. Then, to make the game run, the player will have to click on the appropriate menu item. Figures 4.1 through 4.6 demonstrate the overall execution of the Lottery Assistant game.

image from book
Figure 4.1: The Lottery Assistant game begins by collecting player Input.

image from book
Figure 4.2: Players control the game using its menu system.

image from book
Figure 4.3: Up to 10 sets of lottery numbers can be generated at a time.

image from book
Figure 4.4: Players can configure the game's background color.

image from book
Figure 4.5: Using the Font Size submenu, the user can specify the font size used to display lottery numbers.

image from book
Figure 4.6: By clicking on the About menu item located on the Help menu, players can learn more about the game and its developer.

By the time you have created and run this game, you'll have learned how to create your own menu system, complete with menus, menu items, submenus, access keys, and shortcuts.




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