Lecture 1 - Introduction To

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Visual Basic Dot Net

(VB.NET)

Hudson Nandere Lubinga


Email: [email protected], TEL: 0753625255
Introduction to VB.NET

04/22/2022 Hudson Nandere Lubinga 2


Overview
• Visual Basic .NET (VB.NET) is an object-oriented
computer programming language developed by
Microsoft and implemented on the .NET Framework.
• Although it is an evolution of classic Visual Basic
language, it is not backwards-compatible with VB6,
and any code written in the old version does not
compile under VB.NET.

04/22/2022 Hudson Nandere Lubinga 3


Overview Cont’n
• Like all other .NET languages, VB.NET has complete support for
object-oriented concepts. Everything in VB.NET is an object, including
all of the primitive types (Short, Integer, Long, String, Boolean, etc.)
and user-defined types, events, and even assemblies. All objects
inherits from the base class Object.
• VB.NET is implemented by Microsoft's .NET framework. Therefore, it
has full access to all the libraries in the .Net Framework. It's also
possible to run VB.NET programs on Mono, the open-source
alternative to .NET, not only under Windows, but even Linux or Mac
OSX.

04/22/2022 Hudson Nandere Lubinga 4


Why VB.Net is widely used as a professional
language
• Modern, general purpose.
• Object oriented.
• Component oriented.
• Easy to learn.
• Structured language.
• It produces efficient programs.
• It can be compiled on a variety of computer platforms.
• Part of .Net Framework.

04/22/2022 Hudson Nandere Lubinga 5


The .Net Framework

The .Net framework is a revolutionary


platform that helps you to write the following
types of applications:
• Windows applications
• Web applications
• Web services
04/22/2022 Hudson Nandere Lubinga 6
The .Net Framework Cont’n
• The .Net framework applications are multi-platform applications. The
framework has been designed in such a way that it can be used from any
of the following languages: Visual Basic, C#, C++, Jscript, and COBOL, etc.
• All these languages can access the framework as well as communicate
with each other.
• The .Net framework consists of an enormous library of codes used by the
client languages like VB.Net. These languages use object-oriented
methodology.
04/22/2022 Hudson Nandere Lubinga 7
Components of the .Net framework
• Common Language Runtime (CLR)
• The .Net Framework Class Library
Qn:
• Common Language Specification Briefly Explain the jobs
• Common Type System performed by each of
• Metadata and Assemblies
• Windows Forms
these components.
• ASP.Net and ASP.Net AJAX
• ADO.Net
• Windows Workflow Foundation (WF)
• Windows Presentation Foundation
• Windows Communication Foundation (WCF)
• LINQ

04/22/2022 Hudson Nandere Lubinga 8


Visual Studio.NET
A platform that allows the development and deployment of
desktop and web applications
Allows user choice of many .NET languages
 May program in One of them
 May create different parts of application in different languages
▪ Visual Basic
▪ C# (C Sharp)
▪ C++
▪ J++
▪ Etc.

04/22/2022 Hudson Nandere Lubinga 9


What is Visual Basic.Net
4th Generation Programming Environment /
Development Language
Based on BASIC language
 Beginners All-Purpose Symbolic Instructional Code
Most widely used tool for developing Windows
Applications
 Graphical User Interface (GUI)
 Menus, Buttons, Icons to help the user
Full Object-Oriented Programming Language
04/22/2022 Hudson Nandere Lubinga 10
How a VB Application is Compiled and
Run
Visual Studio .NET .NET Framework

Integrated Common
Visual Basic
Development Language
compiler
Environment Runtime

1 2 3

Solution Assembly

Project
Intermediate Language (IL)

Source files

Class references

04/22/2022 Hudson Nandere Lubinga 11


Project and Solution Concepts
• User creates a new project in Visual Studio
• A solution and a folder are created at the same time
with the same name as the project
• The project belongs to the solution
• Multiple projects can be included in a solution

04/22/2022 Hudson Nandere Lubinga 12


Project and Solution Concepts Cont’n
• Solution
• Contains several folders that define an application’s structure
• Solution files have a file suffix of .sln
• Project: contains files for a part of the solution
• Project file is used to create an executable application
• A project file has a suffix of .vbproj
• Every project has a type (Console, Windows, etc.)
• Every project has an entry point: A Sub procedure named Main or
a Form

04/22/2022 Hudson Nandere Lubinga 13


Project and Solution Folders/Files
• Solution folder
• Solution file (.sln)
• Project folder
• Project file (.vbproj)
• Visual Basic source files (.vb)
• My Project folder: contains configuration information common
to all projects
• The file AssemblyInfo.vb contains assembly metadata
• The References folder contains references to other assemblies
• The bin folder contains the executable file produced as a result
of compiling the application

04/22/2022 Hudson Nandere Lubinga 14


Event-Driven Computer Programs with a Graphical User
Interface
• Most Visual Basic.Net programs are event-driven programs
that communicate with the user through a graphical user
interface (GUI)
• A GUI usually consists of a window, containing a variety of
objects (icons, buttons, images)
• An event means the user has initiated an action (a mouse
click or entering text) that causes the program to perform
the type of processing called for by the user’s action.
• Clicking a button triggers an event, resulting in the program
performing the process called by the click.
15
Event-Driven Computer Programs with a Graphical User
Interface
• Examples of events:
• The user enters the account number in the Account Number box
• The user clicks the Display Account Balance button
• The user clicks the Reset Window button to clear the text boxes and prepare
the user interface for the next
account number

16
Assignment

• Install Visual Studio 2008/2010/2013/2015


and configure it for use.

04/22/2022 Hudson Nandere Lubinga 17

You might also like