Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

Chapter 1 Exploring the Visual Studio Integrated Development Environment 11


The MusicTrivia form is displayed in the Designer, as shown here:

Notice that a tab called MusicTrivia .vb [Design] is visible near the top of the Designer.
You can click this tab to display the program code associated with the MusicTrivia form,
and as other tabs appear at the top of the Designer, you can switch back and forth
among them by clicking the desired tab. You’ll learn more about program code
and the Code Editor tab in Chapter 2, “Writing Your First Program .”
Now try running a Visual Basic program with Visual Studio.

Running a Visual Basic Program

Music Trivia is a simple Visual Basic program designed to familiarize you with the programming
tools in Visual Studio. The form you see now has been customized with five objects (two labels,
a picture, and two buttons), and I’ve added three lines of program code to make the trivia
program ask a simple question and display the appropriate answer. (The program “gives away”
the answer now because it is currently in design mode, but the answer is hidden when you run
the program .) You’ll learn more about creating objects and adding program code in Chapter 2.
For now, try running the program in the Visual Studio IDE.

Run the Music Trivia program


  1. Click the Start Debugging button (the green right-pointing arrow) on the Standard
    toolbar to run the Music Trivia program in Visual Studio.


Tip You can also press F5 or click the Start Debugging command on the Debug menu to
run a program in the Visual Studio development environment.
Free download pdf