[Contents]>>[Lesson2]
1.1 Introduction
Visual Basic 2017 is the latest version of Visual Basic launched by Microsoft in 2017. Visual Basic 2017 is bundled together with other Microsoft Programming languages C# C++, F#, JavaScript, Python and other development tools in an integrated development environment called Visual Studio Community 2017 Release Candidate. Microsoft has added many new features in Visual Studio 2017 particularly those features for building mobile applications and gaming as well as web and cloud-based applications.
Visual Studio Community 2017 RC can be downloaded from the link below. You need to have a Microsoft account to download the package.
https://www.visualstudio.com/downloads/
After clicking on the link above, the following download page appears:
Figure 1.1: Visual Studio Community 2017 Download Page
After downloading the file, run the VS2017RC community installer file
vs_community__695901156.1467100807 (7).exe.
If you receive a User Account Control notice, click Yes. Next, it will ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement, as shown in Figure 1.2. Click Install to continue.
Figure 1.2
You’ll see several status screens that show the progress of the installation. After the installer is finished installing, it’s time to pick the feature set that you want, as shown in Figure 1.3. Since we are keen on developing Visual Basic 2017 desktop app, we will select the .NET desktop development component. Besides that, you might want to install a particular language by clicking the Language packs. After making your selections, click install.
Figure 1.3 Visual Studio 2017 RC Installer
Upon completion of the installation, you are now ready to launch Visual Studio 2017 RC and start programming in Visual Basic 2017
The .NET Desktop application development in Visual Studio 2017 is designed for building WPF, Windows Forms, and console apps using.NET Framework. With shorter solution load time, improved IntelliSense, code navigation, and refactoring save you time and effort on everyday tasks, you can build desktop apps with great UI and better performance.
1.2 Visual Studio Community 2017 Start Page
When you first launch Visual Studio Community 2017, the following start Page appears, as shown in Figure 1.4
Figure 1.4 Visual Studio Community 2017 Start Page
Now click on New Project under Start to launch the New Project window, as shown in Figure 1.5
Figure 1.5 New Project Window
In the New Project window, you can build many kinds of applications using different programming languages. They are Visual Basic, Visual C#, Visual C++, Visual F#, JavaScript, Python and more. As we are only dealing with Visual Basic, we shall click on Visual Basic Windows Form APP(.NET Framework). Before you continue, enter the application name at the bottom. Change the default name WindowsApplication1 to My First VB2017 project.
1.3 Visual Basic Community 2017 Integrated Development Environment
Upon clicking Windows Form Application, the Visual Basic Community 2017 Integrated Development Environment appears, as shown in Figure 1.6. You can see that the name of the project you entered earlier appears on the top right corner of the IDE.
Figure 1.6 Visual Basic 2017 IDE
Visual Basic Community 2017 IDE comprises a few windows, the Form window, the Solution Explorer window and the Properties window. It also consists of a toolbox which contains many useful controls that allow a programmer to develop his or her Visual Basic 2017 programs. The toolbox can be hidden or dragged to the bottom or side of the window.
Now, we shall proceed to show you how to create your first program in Visual Basic 2017. First, change the text of the form to My First VB2017 Program in the properties window, it will appear as the title of the program. Next, insert a button and change its text to Show Message. The design interface is shown in Figure 1.7
Figure 1.7 The Design Interface
Click on the Show Message button to bring up the code window and enter the following statement between Private Sub and End Sub procedure, as shown in Figure 1.8
Figure 1.8 Visual Basic 2017 Code Window
When you run this program and click on the show Message button, you should get the following popup message box.
Figure 1.9 The Message Box
The function MsgBox is a built-in function of Visual Basic 2017 and it will display the text enclosed within the brackets.
Now you have created your first program in Visual Basic 2017, we shall learn more Visual Basic 2017 programming techniques in coming lessons.