0% found this document useful (0 votes)
52 views30 pages

VB Net Training

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views30 pages

VB Net Training

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

PROGRAMMING

WITH VB.NET
A Walkthrough

NATHAN KAPEREMELA - Tutor


OUTLINE
1. INTRODUCTION TO PROGRAMMING
2. PROGRAMMING IN VB.NET – KICK OFF
3. BASIS SYNTAX OF VB.NET PROGRAMS
4. COMMENTS, DECLARATIONS, DATA TYPES, &
EXECUTABLE STATEMETS
5. CONTROL STRUCTURES
6. ASSIGNMENT – Research Areas
PART ONE
1.INTRODUCTION TO
PROGRAMMING
2.PROGRAMMING IN VB.NET
1. WHY PROGRAMMING? WHAT IS IT?
Concept of Programming
 Programming is the process of creating sets of
instructions that enable computers to perform tasks
or solve problems.
 It involves breaking down complex problems into
smaller, manageable steps that a computer can
Importance in Computer
understand and execute. Science
 Programming is fundamental to computer science, serving
as the backbone of software development and
computational problem-solving.
 It empowers individuals and organizations to automate
processes, analyze data, and build innovative
solutions.
WHY PROGRAMMING? WHAT IS IT? Cont’d
Writing Instructions for Computers
 Programming entails writing algorithms and code in
various programming languages to communicate
instructions to computers.
 These instructions dictate how computers should
manipulate data, make decisions, and produce desired
outcomes.
Practical Applications
 Programming finds widespread application across diverse
fields such as software development, data analysis,
and automation
2. GETTING STARTED WITH VB.NET
 Visual Basic (VB) is a high-level, object-oriented
programming language developed by Microsoft.
 It is known for its simplicity, ease of use, and
rapid application development capabilities.
 VB.NET is the latest version of Visual Basic,
designed to work with the .NET Framework.
GETTING STARTED WITH VB.NET Cont’d
Setting Up a Development Environment for VB.NET
 The primary tool for VB.NET development is Microsoft Visual
Studio, a comprehensive integrated development environment
(IDE).
 Visual Studio provides a suite of tools for writing, debugging,
and deploying
Creating VB.NET
a New VB.NET applications.
Project
1. Launch Visual Studio and select "Create a new project" from the
start page.
2. Choose "Visual Basic" from the list of available project templates.
3. Select the type of project you want to create, such as Windows
Forms App or Console App.
4. Provide a name and location for your project.
GETTING STARTED WITH VB.NET Cont’d
The installer – 1 to installer the VB.NET IDE & 2 to Launch the
installed IDE
GETTING STARTED WITH VB.NET Cont’d
The installer – IDEs Installation
GETTING STARTED WITH VB.NET Cont’d
VB.NET IDE – Menu
GETTING STARTED WITH VB.NET Cont’d
VB.NET IDE – Creating a New Project
GETTING STARTED WITH VB.NET Cont’d
VB.NET IDE – Creating a New Project Continued..
GETTING STARTED WITH VB.NET Cont’d
VB.NET IDE – Project Created.
PART TWO
3. BASIC SYNTAX OF VB.NET
PROGRAM
4.COMMENTS DECLARATION, DATA
TYPES, & EXECUTABLE STATEMETS
3. SYNTAX OF VB.NET PROGRAM
Basic Structure of a VB.NET Windows Forms Program
 A VB.NET Windows Forms program typically consists of a graphical
user interface (GUI) built using forms, controls, and event
handlers.
 Each Windows Forms application starts with a main form, which
serves as the primary window of the application.
 The form designer in Visual Studio allows developers to visually
design the user interface by dragging and dropping controls onto
Essential Components
the form.
a. Variable
b. Data types
c. Functions
d. Etc
SYNTAX OF VB.NET PROGRAM Cont’d
Arithmetic Operators Concatenation Operator
a. + (Addition)  &
b. - (Subtraction)
c. * (Multiplication)
d. / (Division) Default Data Types
e. Mod (Modulus) a. Integer – long or integer
Assignment Operators b. Float Point – Double or
a. = (Simple assignment) single
b. += (Addition assignment) c. Decimal
c. -= (Subtraction assignment) d. Boolean
d. *= (Multiplication assignment) e. Date and Time
e. /= (Division assignment)
SYNTAX OF VB.NET PROGRAM Cont’d
The windows form view – Double click the button and start writing the
code
SYNTAX OF VB.NET PROGRAM Cont’d
a. Variables & Data Types syntax
SYNTAX OF VB.NET PROGRAM Cont’d
b. Functions syntax example
4. COMMENTS, STATEMENTS & DATA TYPES
Comments in VB.NET
 Comments are non-executable text annotations within code used
for documentation, explanations, and reminders.
 In VB.NET, comments can be declared using the ' symbol for
single-line comments or Rem keyword for multi-line comments.

Executable Statements
 Executable statements are instructions that are executed by the
computer to perform specific actions.
 For example, assignments, method calls, conditional
statements, loops, and function invocations are all
examples of executable statements.
COMMENTS, STATEMENTS & DATA TYPES Cont’d
Comments and Executable statement example
COMMENTS, STATEMENTS & DATA TYPES Cont’d
User-Defined Data Types (UDT)
 User-defined data types allow developers to create custom data
structures tailored to their application's requirements.
 For example, classes, structures, and enumerations are common
forms of user-defined data types in VB.NET.
PART THREE
5. CONTROL STRUCTURES
i. Sequence
ii. Selection
iii.Iteration
6. FUNCTIONS
5. CONTROL STRUCTURES IN VB.NET
Basic Structure of a VB.NET Windows Forms Program
 Control structures dictate the flow of program execution by
specifying the order in which instructions are executed.
 Control structures enable developers to manage program flow,
make decisions based on conditions, and iterate over data.
Fundamental Types
a. Sequence: Executes instructions in sequential order, from top to
bottom.
b. Selection: Allows branching based on conditions using
constructs such as If...Then...Else statements and Select Case
statements.
c. Loop: Repeats a block of code until a specific condition is met,
CONTROL STRUCTURES IN VB.NET
Comparison Operators
Cont’d
 = (Equal to)
 <> (Not equal to)
 < (Less than)
 > (Greater than)
 <= (Less than or equal to)
 >= (Greater than or equal to)

Logical Operators
 And (Logical AND)
 Or (Logical OR)
 Not (Logical NOT)
CONTROL STRUCTURES IN VB.NET Cont’d
Sequential Statements Example
CONTROL STRUCTURES IN VB.NET Cont’d
Conditional Statements (If-Else and Select Case)
 Conditional statements enable developers to make decisions
based on specific criteria, altering the flow of program execution
accordingly.
CONTROL STRUCTURES IN VB.NET Cont’d
Looping Constructs
 Loops are used to iterate over collections, process data, and
perform tasks until a certain condition is met.
5. CONTROL STRUCTURES IN VB.NET
Functions Overview
 Functions in VB.NET are reusable blocks of code that perform
specific tasks and return a value to the caller.
 They play a crucial role in organizing code, promoting modularity,
and improving code readability.
Function Declaration and Calling – Syntax
FURTHER AREAS OF RESERACH
1. Object Oriented Programming (OOP)
2. Working with Databases such as Mysql, SQLite3
3. VB.NET GUI Programming
4. Deployment of VB.NET Programs
5. Artificial Intelligence and Machine Learning (AI &
ML)
6. ETC

You might also like