[CONTENTS] >>[Lesson 2]
Microsoft launched Visual Basic 2010 in the year 2010. Visual Basic 2010 is a fully object-oriented programming language implemented on the .NET Framework. However, prior knowledge of OOP is not required to learn VB2010. On the other hand, if you have already learned Visual Basic 6, it will be a little easier for you to learn VB2010 because the syntaxes are quite similar. Similar to the earlier versions of VB.NET programming languages, Visual Basic is bundled in an Integrated Development Environment known as Visual Studio. However, the stand-alone Microsoft Visual Basic 2010 Express is still available for download from https://www.visualstudio.com/vs/older-downloads/
After clicking the aforementioned download link, select Visual Studio 2010 VB Express from the screen that appeared, as shown in Figure 1.1
Figure 1.1
After installing and launching the Visual Basic 2010 Express, the Visual Basic 2010 Express IDE Start Page will appear, as shown in Figure 1.2. The VB2010 Express Start Page consists of a few sections, namely:
- The New Project/Open Project section.
- The Recent Projects section that shows a list of projects that have been created by you recently.
- The Getting Started Pane- It provides some helpful tips to quickly develop your applications.
- The Latest News section- It provides latest online news about Visual Basic 2010 Express. It will announce new releases and updates
- The Properties section let you define the properties of each control
Figure 1.2
To start creating your first application, you need to click on the New Project. After clicking on the New project, the following New Project dialog box will appear, as shown in Figure 1.3.
Figure 1.3
The dialog box offers you five types of projects that you can create. As we are going to learn to create Windows Applications, we will select Windows Forms Application.
At the bottom of this dialog box, you can change the default project name WindowsApplication1 to some other name you like, for example, myFirstProgram. After you have renamed the project, click OK to continue. The following IDE Windows will appear, as shown in Figure 1.4.
Figure 1.4 Visual Basic 2010 IDE
It consists of an empty form, the Toolbox tab, and the properties window. The layout is slightly different from vb2008 as the Toolbox is not shown until you click on the Toolbox tab. When you click on the Toolbox tab, the common controls Toolbox will appear, as shown in Figure 1.5.
Figure 1.5 The Toolbox
Now drag the button control into the form, and change its default Text Button1 to OK in the properties window, the word OK will appear on the button in the form, as shown in Figure 1.6.
Figure 1.6
Next, click on the OK button to bring up the code window and then enter the code in the code window, as shown in Figure 1.7.
Figure 1.7 The Code Window
When you run the program and click on the OK button, a dialog box that displays the “WELCOME TO VISUAL BASIC 2010” message will appear, as shown in Figure 1.8
Figure 1.8
[CONTENTS] >>[Lesson 2]