Visual Basic .NET Language Getting started with Visual Basic .NET Language Creating a simple Calculator to get familiar with the interface and code.

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

  1. Once you have installed Visual Studio from https://www.visualstudio.com/downloads/, start a new project.
  1. Interface

  2. Select 'Windows Forms Application' from Visual Basic Tab. You can rename it here if you need to.

  3. Once you click 'OK', you will see this window:

VB.Net editor

  1. Click on the 'Toolbox' tab on the left. The toolbar has 'auto-hide' option enabled by default. To disable this option, click the small symbol between the 'down arrow' symbol and the 'x' symbol, on the top-right corner of Toolbox window.

  2. Get yourself familiar with the tools provided in the box. I have made a calculator interface by using buttons and a Textbox.

Calculator

  1. Click on the Properties tab (It is on the right side of the editor). You can change the Text property of a button, and the textbox to rename them. Font property can be used to alter the font of the controls.

  2. To write the specific action for an event(eg. clicking on a button), double click on the control. Code window will open.

Sample Code

  1. VB.Net is a powerful language designed for fast development. High encapsulation and abstraction is cost for it. You do not need to add semicolon to indicate the end of a statement, there are no brackets, and most of the time, it auto-corrects the case of the alphabets.
  2. Code provided in the picture should be simple to understand. Dim is the keyword used to initialize a variable, and new allocates memory. Anything you type in the textbox is of type string by default. Casting is required to use the value as a different type.

Enjoy your first creation in VB.Net!



Got any Visual Basic .NET Language Question?