Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

72 Part I Getting Started with Microsoft Visual Basic 2010


Run the Hello program

Tip The complete Hello program is located in the C:\Vb10sbs\Chap03\Hello folder.


  1. Click the Start Debugging button on the Standard toolbar.


The Hello program compiles and, after a few seconds, runs in the Visual Studio IDE.


  1. Click OK.


The program displays the greeting “Hello, world!” in the text box, as shown here:

When you clicked the OK button, the program code changed the Text property of the
empty TextBox1 text box to “Hello, world!” and displayed this text in the box. If you
didn’t get this result, repeat the steps in the previous section, and build the program
again. You might have set a property incorrectly or made a typing mistake in the
program code. (Syntax errors appear with a jagged underline in the Code Editor .)


  1. Click the Close button in the upper-right corner of the Hello World program window to
    stop the program.


Note To stop a program running in Visual Studio, you can also click the Stop Debugging
button on the Standard toolbar to close the program.


  1. Click the Save All button on the Standard toolbar to save your new project to disk.


Visual Studio now prompts you for a name and a location for the project.


  1. Click the Browse button.


The Project Location dialog box opens. You use this dialog box to specify the location
of your project and to create new folders for your projects if necessary. Although you
Free download pdf