List of Figures


Chapter 1: An Introduction to Visual Basic 2005 Express Edition

Figure 1.1: The initial window of the Joke Machine game.
Figure 1.2: Viewing the first joke told by the Joke Machine game.
Figure 1.3: Viewing the second joke told by the Joke Machine game.
Figure 1.4: Visual Basic 2005 Express starts by displaying information about available Visual Basic resources.
Figure 1.5: Microsoft .NET Framework enables the development of multilanguage applications on different execution environments.
Figure 1.6: Select the Windows Application template to create a new Windows application.
Figure 1.7: By default, Visual Basic automatically creates a new blank form for new Windows applications.
Figure 1.8: Adding and resizing a TextBox control on a Visual Basic form.
Figure 1.9: Visual Basic automatically adds descriptive text labels to controls as you add them to a form.
Figure 1.10: Visual Basic code statements are attached to controls by keying them in using the code editor.

Chapter 2: Navigating the Visual Basic 2005 Express Edition Development Environment

Figure 2.1: Starting up the Click Race game.
Figure 2.2: Players score points by clicking on the currently active game button.
Figure 2.3: To score another point, the player must click on the second game button.
Figure 2.4: Game plays ends at 30 seconds when both game buttons are disabled.
Figure 2.5: The Visual Basic IDE only has room to show a portion of the available toolbars and windows at any one time.
Figure 2.6: Microsoft has implemented a number of clever organizational tricks to make the IDE more manageable.
Figure 2.7: Standard toolbar provides access to commonly used IDE commands and windows.
Figure 2.8: Visual Basic automatically creates a new form containing basic Windows elements each time you open up a new Visual Basic project.
Figure 2.9: The form designer provides visual indicators that assist you in aligning form controls.
Figure 2.10: The code editor is the tool that you use to create and modify program code for your Visual Basic applications.
Figure 2.11: The Visual Basic code editor automatically color codes statements and indents them to make them easier to read.
Figure 2.12: IntelliSense provides dynamic assistance as you enter your code statements.
Figure 2.13: IntelliSense can assist you in the creation of complex code statements and in reducing typo mistakes.
Figure 2.14: Using the Ctrl and Space keys to manually start up IntelliSense.
Figure 2.15: The Toolbox window provides access to the controls with which you create windows.
Figure 2.16: Using Solution Explorer, you can manage the projects and files that make up your Visual Basic applications.
Figure 2.17: Examining the properties associated with a Button control.
Figure 2.18: When only a finite number of values are available for a property, the Properties window displays them in a drop-down list for your selection.
Figure 2.19: Sometimes you will be presented with an additional dialog from which you can select the values that you want to assign to a given property.
Figure 2.20: Because the user cannot see or Interact with the Timer object, it is added to a component tray.
Figure 2.21: Completing the interface design for the Click Race game.

Chapter 3: Creating an Application Interface

Figure 3.1: The Speed Typing game begins when the player clicks on the Go button.
Figure 3.2: Players advance by typing in the required text string within the allotted amount of time.
Figure 3.3: Players who fail to type the required text in time receive a strike.
Figure 3.4: Players who make a typo when keying in the required text string receive a strike.
Figure 3.5: The player's typing skill level is analyzed and displayed at the end of game play.
Figure 3.6: Unless you specify otherwise, Visual Basic will allow users to change the size of your application's window.
Figure 3.7: By default, Visual Basic displays a form's name in its title bar.
Figure 3.8: Programmatically changing the text string displayed in the window's title bar.
Figure 3.9: Modifying the default tab order of the controls located on a Visual Basic form.
Figure 3.10: A Windows status bar displaying the current date and application status information in two separate panels.
Figure 3.11: Using the StatusBarPanel Collection Editor, you can organize a status bar into any number of panels.
Figure 3.12: Status bars provide an effective tool for communicating information with users.
Figure 3.13: The Windows System Tray provides single-and double-click access to various Windows utilities, processes, and applications.
Figure 3.14: Configuring a Visual Basic application to begin by displaying a splash screen.
Figure 3.15: A splash screen gives the application developer a chance to share additional information with the user before the application starts.
Figure 3.16: The application's main window appears as soon as the splash screen closes.
Figure 3.17: The MessageBox.Show method is perfect for displaying a small amount of text information.
Figure 3.18: Twenty-one different formats of the MessageBox.Show methods are supported.
Figure 3.19: Prompting the user for permission to continue.
Figure 3.20: Displaying a simple Informational message.
Figure 3.21: Prompting the user to select from three options.
Figure 3.22: Viewing the results of the button selection made by the user.
Figure 3.23: Examining the composition of a pop-up window generated by an InputBox function.
Figure 3.24: Examining the debug version of your Visual Basic application.
Figure 3.25: Examining the release build version of your Visual Basic application.
Figure 3.26: Locating and running the release build version of your Visual Basic application.
Figure 3.27: Completing the interface design for the Speed Typing game.

Chapter 4: Working with Menus and Toolbars

Figure 4.1: The Lottery Assistant game begins by collecting player Input.
Figure 4.2: Players control the game using its menu system.
Figure 4.3: Up to 10 sets of lottery numbers can be generated at a time.
Figure 4.4: Players can configure the game's background color.
Figure 4.5: Using the Font Size submenu, the user can specify the font size used to display lottery numbers.
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.
Figure 4-7: Examining the contents of the Visual Basic Express 2005 File menu.
Figure 4.8: Using the MenuStrip control to add a menu system to a Visual Basic application.
Figure 4.9: Defining the first menu heading In the application's menu system.
Figure 4.10: Adding an additional menu to the application's menu system.
Figure 4.11: Adding a menu item under a menu heading.
Figure 4.12: Adding a submenu item to the menu system.
Figure 4.13: Inserting a preconfigured menu system to a forms.
Figure 4.14: Adding code to the Exit menu item that will close the application when the user clicks on it.
Figure 4.15: Specifying the shortcut you wish to assign to a menu or menu item.
Figure 4.16: Adding shortcut keys to menus and menu items.
Figure 4.17: Adding access keys to menus and menu items.
Figure 4.18: Using a check mark to indicate when a menu item has been selected.
Figure 4.19: Using separator bars to visually group related menu items together.
Figure 4.20: Disabling a menu item at design time.
Figure 4.21: Disabling a menu item and its associated submenu.
Figure 4.22: Making the Custom submenu item invisible on the Background submenu.
Figure 4.23: You can also control user access to menu items by hiding and redisplaying them when appropriate.
Figure 4.24: Configuring the menu items for a context menu.
Figure 4.25: Examining the contents of Button control's associated context menu.
Figure 4.26: Adding and removing buttons to a toolbar.
Figure 4.27: Use the up and down arrows to configure the order in which buttons are displayed on the toolbar.
Figure 4.28: Identifying the images that you plan on using to add graphics to your toolbar.
Figure 4.29: Adding a graphic image to a ToolBar control button.
Figure 4.30: Setting up programming logic to respond to button clicks.
Figure 4.31: Completing the interface design for the Lottery Assistant game.

Chapter 5: Storing and Retrieving Data in Memory

Figure 5.1: The Story of Mighty Molly game begins by prompting the player to click on each of six buttons that are designed to collect player input and tell the story.
Figure 5.2: Players' input is collected using the InputBox() function.
Figure 5.3: Buttons change colors to indicate that the player has already supplied their associated input.
Figure 5.4: A progress bar Located on the status bar indicates when all required information has been collected.
Figure 5.5: Data input collected from the player is then plugged into the story line and displayed for the player to enjoy.
Figure 5.6: By assigning a string to a constant, you can use it throughout your application to specify a title bar message in all pop-up windows.
Figure 5.7: Using string constants to specify the output format of a string.
Figure 5.8: Using IntelliSense to view methods and properties associated with a variable object.
Figure 5.9: Adding Option Strict On forces Visual Basic to alert you to variable conversion problems.
Figure 5.10: Managing large amounts of related data using an array based on a custom structure.
Figure 5.11: Completing the interface design for the Story of Mighty Molly game.

Chapter 6: Applying Conditional Logic

Figure 6.1: The game begins by allowing the player to specify configuration options, including the range of numbers to pick from and the amount of information the game will display.
Figure 6.2: Once game play starts, the player's access to the configuration options is disabled and the player is prompted to take the first guess.
Figure 6.3: The game provides players with clues to help them hone in on the answer. It also displays a running count of the number of guesses made by the player.
Figure 6.4: At the end of each game, the player gets a chance to modify the game's configuration options and reset the score.
Figure 6.5: Validating player age before allowing the game to be played.
Figure 6.6: A flowchart showing the logic the IfThenElse statements.
Figure 6.7: Using an IfThenElseIf statement to process the contents of a ComboBox control.
Figure 6.8: Using the String Collection Editor at design time to populate the contents of a ComboBox control.
Figure 6.9: Completing the interface design for the Guess a Number game.

Chapter 7: Processing Lots of Data with Loops

Figure 7.1: The Dice Poker game begins by giving the player $20 in an account.
Figure 7.2: Players can elect to hold onto specific dice before rolling the dice a second time.
Figure 7.3: Two dollars are deducted from the player's account for each losing hand.
Figure 7.4: Winning hands are rewarded with additional credits to the player's account.
Figure 7.5: Winning hands include three, four, and five of a kind, as well as full house and high or low straights.
Figure 7.6: The game automatically ends if the player's account runs out of money.
Figure 7.7: Processing the names of books using a DoWhile loop.
Figure 7.8: Displaying the information that was collected by the DoWhile loop.
Figure 7.9: Using a DoUntil loop to prompt the player to terminate the game.
Figure 7.10: The game sarcastically responds to the player when he or she fails to enter the word "Quit."
Figure 7.11: Using a ForNext loop to populate the contents of a ListBox.
Figure 7.12: You can set up a ForNext loop that processes all of the contents of a ListBox control.
Figure 7.13: The ForNext loop spins through the contents of the ListBox and uses the data to display a list of customers.
Figure 7.14: Using a ForEachNext loop to process the contents of an array.
Figure 7.15: Completing the interface design for the Dice Poker game.
Figure 7.16: A flowchart depicting the logic required to determine the amount to add or deduct from the player's account.

Chapter 8: Enhancing Code Structure and Organization

Figure 8.1: When first started, the game displays a graphic showing an empty hangman's gallows and a series of underscore characters representing the secret word.
Figure 8.2: As the game progresses, each correct guess is displayed at the top of the window, and a visual record of every letter guessed is displayed at the bottom of the window.
Figure 8.3: The game prevents the player from making the same letter guess more than once.
Figure 8.4: The game only permits the player to enter one letter at a time.
Figure 8.5: The game prevents the player from entering numeric input.
Figure 8.6: The game congratulates the player when the secret word has been successfully guessed.
Figure 8.7: If the player fails to guess the secret word within six guesses, the game is lost and the picture of the hangman's gallows is updated to show a full hangman image.
Figure 8.8: A procedure returns program flow control back to the statement that calls it once it finishes executing.
Figure 8.9: Using the Optional keyword, you can create flexible procedures that can process different numbers of arguments.
Figure 8.10: Using the Visual Basic's InputBox() function to display a pop-up dialog that collects user input.
Figure 8.11: Using the DateTime.Now() function to display the current date and time.
Figure 8.12: Using the TimeSpan object's Subtract method to count the number of days between two dates.
Figure 8.13: Using date-related functions to create a digital clock.
Figure 8.14: Examining the Layout of the Hangman game's user interface.

Chapter 9: Getting Comfortable with Object-Oriented Programming

Figure 9.1: The Rock, Paper and Scissors game beings by displaying the game board.
Figure 9.2: When the player clicks on the Play button, a 1.5-second countdown begins.
Figure 9.3: The player gets a half-second at the end of the countdown to make a selection by choosing Rock, Paper, or Scissors.
Figure 9.4: As soon as both the computer and the player have made their choices, the game displays graphics showing each move and determines who won.
Figure 9.5: The Rock, Paper and Scissors game also keeps a running tally of the number of wins, losses, and ties.
Figure 9.6: Defining a new class in its own code module.
Figure 9.7: Viewing the code that Visual Basic automatically created for the new class.
Figure 9.8: Completing the interface design for the Rock, Paper and Scissors game.

Chapter 10: Integrating Graphics and Audio

Figure 10.1: The user interface for the VB Doodle game consists of a control panel and a drawing area.
Figure 10.2: VB Doodle provides the player with a range of colors to choose from.
Figure 10.3: The game assists the player in drawing an assortment of predefined shapes.
Figure 10.4: The player also has the option of making a freehand drawing using any combination of colors.
Figure 10.5: A graphical depiction of the coordinate system employed by GDI+ when drawing graphics.
Figure 10.6: An example of an application that uses the PictureBox and ImageList controls to work with graphics.
Figure 10.7: Using the Graphics class's DrawRectangle method to draw a square.
Figure 10.8: Drawing a filled-in circle using the Graphics object's FillEllipse method.
Figure 10.9: Visual Basic allows you to draw text as a graphic.
Figure 10.10: Using the Windows Sound Recorder utility to create a custom wave file.
Figure 10.11: The Audio Jukebox application demonstrates how to control the play of various wave files.
Figure 10.12: Completing the interface design for the VB Doodle game.

Chapter 11: Debugging Visual Basic Applications

Figure 11.1: The Tic-Tac-Toe game begins by displaying a blank game board.
Figure 11.2: The game keeps track of each player's turn.
Figure 11.3: The game monitors each player's move and determines when there is a winner.
Figure 11.4: The Compiler flags Visual Basic syntax errors by underlining them with a jagged blue line.
Figure 11.5: An example of a Visual Basic runtime error displayed when an application is being executed In design mode.
Figure 11.6: Using a breakpoint to pause an application's execution.
Figure 11.7: The Visual Basic IDE changes the highlight of the currently active breakpoint.
Figure 11.8: Using the Debug icons on the standard toolbar to step through program statements.
Figure 11.9: An example of a typical Visual Basic run-time error.
Figure 11.10: Examining the error message generated when your application runs into an unhandled exception at run-time.
Figure 11.11: Using an exception handler to generate a more user friendly error message.
Figure 11.12: Using IntelliSense to examine exceptions.
Figure 11.13: Completing the interface design for the Tic-Tac-Toe game.




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