Objective
• The studentsshould 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.
LESSON
• What isVisual 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.
5.
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, 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.
6.
VB.NET
• VB.NET isimplemented by Microsoft's .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.
7.
Microsoft provides thefollowing development tools for
VB.Net programming
• Visual Studio 2010 (VS)
• Visual Basic 2010 Express (VBE)
• Visual Web Developer
8.
Features of
Visual
Basic .NET
VBcontains 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 very powerful and simple for building the
applications.
VB is useful in developing windows, web and
device applications.
Easy-to-use Generics
9.
The VB IDEStart 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.
11.
Parts of VB.NetIDE
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
12.
Parts of VB.NetIDE
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
13.
What are Formsin VB.Net
•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 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.
16.
Form Methods
• Activate
•Activate the form
• Show
• Shows the form
• Close
• Close the form
• Hide
• Hide the form
• Example
• frmExample.Show
• frmExample.hide
Label
Allows you todisplay 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