Datasheet
P1: GIG
WY006-01 WY006-Sample WY006-Sample-v3.cls January 29, 2004 17:49
Chapter 1
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExit.Click
'End the program and close the form
Me.Close()
End Sub
You may be wondering what Me is. Me refers to the form. Just like the pronoun me, it is just a
shorthand for referring to oneself.
4.
Now that the code is finished, the moment of truth has arrived and you can see your creation.
First though, save your work by using File
➪ Save from the menu, or by clicking the disk icon on
the toolbar.
5. Now click on the Start button on the toolbar. You will notice a lot of activity in the Output
window at the bottom of your screen. Provided you have not made any mistakes in entering the
code, this information just lets you know what files are being loaded to run your application.
It is at this point that Visual Studio .NET will compile the code. Compiling is the activity of
taking the Visual Basic .NET source code that you have written and translating it into a form that
the computer understands. After the compilation is complete, Visual Studio .NET will run (also
known as execute) the program and we’ll be able to see the results.
If Visual Basic .NET encounters any errors, they will be displayed as tasks in the Task List window.
Double-clicking on a task will transport you to the offending line of code. We will learn more about how to
debug the errors in our code in Chapter 9.
6. When the application loads you will see the main form. Enter a name and click OK (or press the
Alt+O key combination) (see Figure 1-20).
Figure 1-20
30