Sample Program

Web Quest  Home Page   Introduction   Goals  Components  Sample Program   Exit   Feedback  Quiz

 

Running a Visual Basic Program

To run the Snake Game:

Open Visual Basic.

Click on the Existing Tab.  

Choose the location of the folder by clicking in down arrow in the Look In drop down list.  

Choose the drive or disk that holds the data files for this lesson.**  A list of files appears in the dialog box.  

Double-click folders until the Snake Game file name is listed. 

Click Snake Game, then click the Open button.  

**The Student data files that accompany the student text book.  Some installations of Visual Basic may also have sample data files.  Check your installation documentation.

 

 

Click the Start button from the standard toolbar.  The Snake Game program appears as in the diagram. Click the Start Game button and a line (the snake) begins growing toward the bottom of the box. 

Before the line reaches the bottom of the box, click the Right button.  The line will turn to the right and continue toward the right edge of the box.

Continue clicking the UP, DOWN, LEFT, and RIGHT buttons to steer the path of the line.  When the line hits the edge of the box or crosses its own path, the game is over.

When the game is over, click the OK button to dismiss the Game Over message.

Click the Quit button to exit the program.  The Visual Basic environment is active again.

Top

Created:  June, 2007

Instructor:  J. Knight