Introduction to Visual Basic Programming. Lecture Outline History What is Visual Basic First Look at the VB 6.0 Environment Some VB Terminology Our first.

Slides:



Advertisements
Similar presentations
An Introduction to Visual Basic Terms & Concepts.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
Chapter 2 –Visual Basic, Controls, and Events
PROBLEM SOLVING The first step in writing instructions to carry out a task is to determine what the output should be (What should the task produce?) The.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
The Initial Visual Basic Screen
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Visual Basic.net IDE. Integrated Development Environment.
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code An “Interpreted” teaching language English-like.
Exploring the Basics of Windows XP
Chapter 2 –Visual Basic, Controls, and Events
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta.
1 Programming Concepts Module Code : CMV6107 Class Contact Hours: 45 hours (Lecture 15 hours) (Laboratory/Tutorial 30 hours) Module Value: 1 Textbook:
Visual Basic Chapter 1 Mr. Wangler.
Chapter 1 Introduction to Visual Basic Programming and Applications 1 Joshi R.G. Dept. of Computer Sci. YMA.
Introduction to Visual Basic (VB)
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 1 P. 1 Writing Windows applications with Visual Basic Figure 1.1 The first program works as follows: (These operations can be performed in any.
An Introduction to Visual Basic
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
PROBLEM SOLVING The first step in writing instructions to carry out a task is to determine what the output should be (What should the task produce?)
Integrated Development Environment (IDE)
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
Chapter 3 Introducing Visual Basic
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction It is developed to create software applications. It is a tool for developers of any program that uses both basic and expert settings. It.
1 Course Title: Visual Basic Programming Topic: Introduction to programming Languages (Visual basic 6.0) Lecturer: Mahamud Ahmed Jimale, BsIT, MsCs, CCNA,
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Chapter Two Creating a First Project in Visual Basic.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
DEPARTMENT OF COMPUTER SCIENCE Introduction to Visual Basic BCA 3 RD YR PRESENTED BY HASHIR UN NABI Dated:01/07/
Chapter 1 Introduction to Visual Basic
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
An Introduction to Computers and Visual Basic
1. Introduction to Visual Basic
An Introduction to Computers and Visual Basic
An Introduction to Visual Basic
VISUAL BASIC.
CIS16 Application Development Programming with Visual Basic
An Introduction to Computers and Visual Basic
Presentation transcript:

Introduction to Visual Basic Programming

Lecture Outline History What is Visual Basic First Look at the VB 6.0 Environment Some VB Terminology Our first VB Program

History

BASIC BASIC (Beginner's All-purpose Symbolic Instruction Code) Designed in 1964, by Kemeny and Kurtz at Dartmouth Goal was to provide access for non-science students to computers. Back then all use of computers required writing custom software – But only Computer Scientists/Mathematicians did this Language became widespread on microcomputers in the late 1970s and home computers in the 1980s.

A Simple BASIC Program

MS DOS Command Line

MS-DOS Shell

Visual Programming (MS Windows 3.1)

Visual Programming Today (MS Vista)

What is Visual Basic?

What is Visual Basic? Visual Basic (VB) is a Microsoft Windows programming language (SOFTWARE development language) Visual Basic is derived from the BASIC (Beginners All-purpose Symbolic Instruction Code) programming language BASIC was developed in the mid-1960s The widespread use of BASIC led to many enhancements to the language In the late 1980s and early 1990s, with the development of the Microsoft Windows (Graphic User Interface) GUI, the natural evolution of BASIC was Visual Basic (created by Microsoft in 1991)

VB greatly simplifies the development of Microsoft Windows-based Applications Between 1991 and versions of VB were released, with Visual Basic 6 appearing in September Microsoft provides several versions of VB, namely the Learning Edition, the Professional Edition and the Enterprise Edition VB programs are created in an Integrated Development Environment (IDE). The IDE allows a programmer to create, run and debug VB programs conveniently. The process of rapidly creating an application is typically referred to as Rapid Application Development (RAD). VB is the most widely used RAD language.

The Visual Basic Environment Visual Studio

The Visual Basic Environment In using VB you will learn to write computer programs that run in the Microsoft Windows environment Projects will look and act like standard Windows programs VB provides the tools you need to create windows with familiar elements like: Menus, Text Boxes, Command Buttons, Option Buttons, Check Boxes, List Boxes, and Scroll Bars

Microsoft Windows uses a Graphic User Interface (GUI) The Windows GUI defines how the various elements look and function Within VB there is a Toolbox of these elements In VB you will create new Windows called Forms Using the toolbox to add the various elements, called Controls, to the form VB programming is known as Event-Driven Programming

The Initial Visual Basic Screen Toolbox Project Explorer window Properties window Form Menu bar Description pane Form Layout window Toolbar Project Container window

Some VB Terminology Objects, Properties and Methods

In VB you work with Objects, which have Properties and Methods Objects: Think of an Object as a thing, or a noun Examples of Objects are Forms and Controls Forms are the Windows and Dialog Boxes that you place on the screen Controls are the elements you place inside a form, such as Text Boxes, Command Buttons, and List Boxes

Properties: Think of Properties as adjectives that describe objects Properties tell something about an Object, such as the name, colour, size, location, and how it will behave When you refer to a Property [1] Name the Object [2] Name the Property (Example: Form1.Caption) The Caption Property of the Object (Form) called Form1

Methods: Methods are the verbs of Object-Oriented Programming Methods are Actions associated with Objects Example of Methods include Move, Print, Resize, and Clear Refer to Methods as: Object.Method (Example: Form1.Print) Sends output (Prints) to the Object (Form) called Form1 (Question: What does this Method refer to?) Printer.Print

Steps to Create a Visual Basic Program 1. Create the interface by placing controls on the form 2. Set properties for the controls and the form 3. Write code for event procedures associated with the controls and the form

Placing a Text Box on a Form Double-click on the text box icon in the toolbox to add a text box to your form Activate the properties window (Press F4) Set values of properties for text box

Placing a Text Box on a Form Text box

Our First VB Program “Hello World”

Private Sub cmdPush_Click ‘Display the ‘Hello World’ Message lblMessage.Caption = “Hello World” End Sub *********************************************** Private Sub cmdExit_Click ‘Exit the project End End Sub Comment Assignment

Naming Objects:

Visual Basic Events Code is a set of statements that instruct the computer to carry out a task. Code can be associated with events When an event occurs, the code associated with that event (called an Event Procedure) is executed.

Creating An Event Procedure Double-click on an object to open a Code window. (The empty default event procedure will appear. Click on the Procedure box if you want to display a different event procedure.) Write the code for that event procedure.

Example of An Event Procedure Private Sub objectName_event ( ) statements End Sub Private Sub txtOne_GotFocus( ) txtOne.Font.Size = 12 txtOne.Font.Bold = False End Sub

More Examples Private Sub cmdButton_Click( ) txtBox.ForeColor = vbRed txtBox.Font.Size = 24 txtBox.Text = “Hello” End Sub