ICT - PROGRAMMING
Introduction to
Visual Basic .NET
Objective
• The students should be able to:
• understand visual basic .NET in programming.
• apply the use of visual basic .NET in programming.
• cite the importance of visual basic .NET in programming.
RECAP
WHAT IS HTML MEANS? WHAT IS CSS MEANS?
Hypertext Markup Language Cascading Style Sheets
LESSON
• What is Visual Basic .NET?
• Alan Cooper created a visual programming
language in 1988.
• Visual Basic (VB) is an object-oriented and visual
programming and type-safe programming language.
• Visual Basic language has its roots from the family of C
languages such as C, C++ and it is mostly similar to Java
programming.
Visual Basic Programming
• Visual Basic (VB) Programming language will allow developers to build a
variety of secure and strong applications which will run on .NET
Framework.
• Like all other .NET languages, [Link] has complete support for
object-oriented concepts.
• Everything in [Link] is an object, including all of the primitive types
(Short, Integer, Long, String, Boolean, etc.) and
• user-defined types, events, and even assemblies.
[Link]
• [Link] is implemented by Microsoft's .NET framework. It's
also possible to run [Link] programs on Mono, the open-
source alternative to .NET, not only under Windows, but even
Linux or Mac OSX.
Microsoft provides the following development tools
for [Link] programming
• Visual Studio 2010 (VS)
• Visual Basic 2010 Express (VBE)
• Visual Web Developer
VB contains various features that make it similar
to other programming languages such as Visual
Basic, C#, C++, Jscript, and COBOL, etc.
VB is a modern programming language and it is
Features of very powerful and simple for building the
applications.
Visual Basic
.NET VB is useful in developing windows, web and
device applications.
Easy-to-use Generics
The VB IDE Start Page has following sections:
• The Start section has the New Project and Open Project
commands that are used to create a new project to open an
existing project, respectively.
• The Recent section shows a list of a recently created projects.
• The Getting Started section provide links on how to build an
application using Visual Basic.
• The Announcement section provides latest online on how to build
news about Visual Studio.
• The Solution Explorer section shows the tree structure of all the
Windows files in your application.
Parts of [Link] IDE
1. MENU Bar
• Is the line of text that lies across the top of the Visual Basic .Net Window
2. Standard toolbar
• It gives you quick access to the menu bar commands you’ll use most
frequently.
• Tooltip – is a little box that pops-up and explain to you what the button
function is
3. ToolBox
• Contain the bits and pieces you need to build your application interface
4. Form Designer
• This is the workspace where you actually design the visual layout of the
form and the controls that lie on it.
Parts of [Link] IDE
5. Output window
6. Solution Explorer
• Is your quick reference to the various elements-form, classes and
modules in your project.
7. Properties Window
• Expose the various characteristics (or properties) of selected object
What are Forms in [Link]
• Form are where the user interface is drawn
• It is central to the development of Visual Basic
Application
• Windows that you create for the user interface
• The most common prefix abbreviation for a form is
frm.
FORM Properties
Form Events
• Activated
• Form Activated event is triggered when form become the active window
• Click
• Form Click event is triggered when users click on form
• DoubleClick
• Form DoubleClick event is triggered when user double clink on form
• Load
• Form Load event occurs when form is loaded. This is good place to initialize
variables and set any runtime properties.
Form Methods
• Activate
• Activate the form
• Show
• Shows the form
• Close
• Close the form
• Hide
• Hide the form
• Example
• [Link]
• [Link]
Visual [Link]
CONTROLS
Label
Allows you to display text
• Label Properties
• Auto Size
• If true, the label is resized to fit the text specified by the caption property. If False, the
label will remain the size define at the design time and the text maybe clipped.
• Border style
• Determine the type of border
• Font
• Set font type, style and size
• Name
• Identify the label of the application
• Text
• String to be displayed in box
Textbox
Textbox
Button
ListBox