Datasheet
P1: GIG
WY006-01 WY006-Sample WY006-Sample-v3.cls January 29, 2004 17:49
Chapter 1
Table 1-1 Common prefixes in Visual Basic .Net
Control Prefix
Button cmd or btn
ComboBox cbo
CheckBox chk
Label lbl
ListBox lst
MainMenu mnu
RadioButton rdb
PictureBox pic
TextBox txt
functionality behind those on-screen elements is no more difficult. To add the code for a control, you just
double-click on it. This will open the code editor in the main window, shown in Figure 1-19:
Figure 1-19
Notice that an additional tab has been created in the main window. Now you have the Design tab and the
Code tab. You draw the controls on your form in the Design tab and you write code for your form in the
Code tab. One thing to note here is that you have not created a separate file for the code. The visual
definition and the code behind it both exist in the same file: HelloUser.vb. This is actually the reason why
building applications with Visual Basic .NET is so slick and easy. Using the Design view you can visually
lay out your application, and then using the Code view you add just the bits of code to implement your
desired functionality.
You will also notice that there are two combo boxes at the top of the window. These provide shortcuts to
the various parts of your code. If you pull down the one on the left you will see a list of all the objects
within your application. If you pull down the one on the right you will see a list of all defined functions
28