1 An Introduction to Visual Basic 2005. 2 Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

Chapter 1: An Introduction to Visual Basic 2012
Windows Programming 1 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
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.
Chapter 1: An Introduction to Visual Basic.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Getting Started with VB .NET
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
Introduction to Programming and Visual Basic
Creating a Console Application with Visual Studio
Chapter 1 Introduction to Programming and C# Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
A First Program Using C#
Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET.
Visual Basic Chapter 1 Mr. Wangler.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET.
Microsoft Visual Basic 2005: Reloaded Second Edition
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
An Object-Oriented Approach to Programming Logic and Design
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
 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.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
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 Studio 2010 Teacher: Ms. Olifer.
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
1.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Overview.ppt Overview-An Overview of Visual Basic.NET An Overview of Visual Basic.NET.
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.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Programming with Microsoft Visual Basic 2012 Chapter 1: An Introduction to Visual Basic 2012.
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter One An Introduction to Visual Basic 2008.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Dive Into® Visual Basic 2010 Express
Chapter 1: An Introduction to Visual Basic .NET
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Microsoft Visual Basic 2005: Reloaded Second Edition
1. Introduction to Visual Basic
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
Presentation transcript:

1 An Introduction to Visual Basic 2005

2 Objectives Explain the history of programming languages Define the terminology used in object-oriented programming Explain the role of the.NET Framework class library and Common Language Runtime (CLR) Create a Visual Basic 2005 Windows-based application Manage the windows in the Integrated Development Environment (IDE) Print a project’s code Add a control to a form Set the properties of an object Enter code in the Code Editor window Save a solution

3 Terms Programs: instructions given to computers Programmers: people who write programs Applications programmers: write and maintain programs to handle specific tasks Systems programmers: write and maintain programs that run the system, such as operating systems, device drivers, utilities

4 A Brief History of Programming Languages Programming languages: used to communicate with the computer Machine language (or machine code): –Instructions are written in 0s and 1s –Only way to communicate directly with the computer Assembly languages: use mnemonics for instructions Mnemonics: alphabetic abbreviations for instructions

5 A Brief History of Programming Languages (continued) Assembler: program that converts assembly language instructions into machine code High-level languages: –Instructions resemble English language –Require an interpreter or compiler to convert high-level language to machine code Interpreter: translates high-level instructions line-by-line as the program runs Compiler: translates entire program into machine code before running the program

6 A Brief History of Programming Languages (continued) Procedure-oriented program: one that focuses on individual tasks and their sequence Object-oriented program: one that focuses on objects the program can use to accomplish its goal

7 OOP Terminology OOP: Object-oriented programming OOD: Object-oriented design Object: –Represents a real-world entity –Attributes (or properties): describe the object –Methods: behaviors or operations the object can perform Class: blueprint used to create an object

8 OOP Terminology (continued) Encapsulation: the class contains all the attributes and behaviors of the object created from the class Instance: an object created from a class Abstraction: the hiding of internal details of an object Exposed: attributes and behaviors that are not hidden Inheritance: ability to create one class from another

9 OOP Terminology (continued) Derived class: a new class created from another by inheritance Base class: the class used to create the new class Polymorphism: allows the same instructions to be carried out differently depending on the object

10 Visual Studio 2005 Integrated Development Environment (IDE): –Contains all the tools and features needed to create, run, and test programs –Includes an editor and compiler Visual Studio 2005: –IDE used to create Windows or Web-based programs –Includes Visual Basic 2005, Visual C , Visual C# 2005, and Visual J# 2005

11 Visual Studio 2005 (continued) Application: program or suite of programs Windows-based application: –Has a Windows user interface –Runs on a desktop computer User interface: what the user sees and interacts with when using an application

12 Visual Studio 2005 (continued) Web-based application: –Has a Web user interface –Runs on a server –Use a computer browser to access it Microsoft.NET Framework 2.0: a platform on which you create applications.NET languages: the programming languages included in Visual Studio.NET applications: applications created with Visual Studio

13 Visual Studio 2005 (continued).NET Framework class library: –Contains an extensive set of classes for use in.NET applications –Reduces development time by providing reusable code –Provides consistency among applications

14 The Common Language Runtime. NET language compilers translate program statements into a Microsoft Intermediate Language, also called Intermediate Language (IL) Common Language Runtime (CLR): –Manages the execution of IL instructions Just-in-time (JIT) compiler: translates IL into machine code CLR allows compiled IL to be reused, regardless of which.NET language was used to create it

15 Solutions, Projects, and Files Solution: a container that stores projects and files for an entire application Project: a container that stores files associated with a specific part of the solution

16 Starting Microsoft Visual Studio 2005

17 Starting Microsoft Visual Studio 2005 (continued)

18 Starting Microsoft Visual Studio 2005 (continued)

19 Creating a Visual Basic 2005 Windows-Based Application

20 Creating a Visual Basic 2005 Windows-Based Application (continued)

21 Creating a Visual Basic 2005 Windows-Based Application (continued)

22 Managing the Windows in the IDE

23 The Windows Form Designer Window Windows Form Designer window: –Allows you to create (design) the GUI Graphical User Interface (GUI): what the user sees and interacts with when using the application Windows Form object (or form): –Adds other objects such as buttons and textboxes to create the GUI –Instance of the Windows Form class –Automatically instantiated when you create an application

24 The Windows Form Designer Window (continued)

25 The Solution Explorer Window Solution Explorer window: –Displays a list of projects contained in this solution –Displays the items contained in each project

26 The Solution Explorer Window (continued) Project Designer window: –Open by right-clicking on project folder –Allows you to set options for the project –Contains 9 tabs with groups of options

27 The Solution Explorer Window (continued)

28 The Solution Explorer Window (continued)

29 The Solution Explorer Window (continued) Source file: a file containing program instructions Code: program instructions Form file: a file containing code associated with a Windows form object

30 The Properties Window Properties window: displays properties of selected object Default property values are assigned when an object is created

31 The Properties Window (continued)

32 The Properties Window (continued) Properties window includes an Object box and a Properties list Object box: –Located immediately below Properties window title bar –Contains the name of the selected object Properties list: –Left column displays names of properties –Settings box: Right column containing the current value of each property

33 Properties of a Windows Form Object

34 Properties of a Windows Form Object (continued) Class definition: block of code that defines the attributes and behaviors of an object Namespace: defines a group of related classes Dot member access operator: the period that separates words in an object’s name Name property: used to refer to an object in code Hungarian notation: naming convention using a 3 or more character prefix to represent the object type Camel casing: lowercase prefix, uppercase first letter of each word

35 Properties of a Windows Form Object (continued) Pascal case: –First letter and first letter of each word is uppercase –First part of name is object’s purpose –Second part of name is object’s class Text property: controls the caption displayed on form’s title bar StartPosition property: determines the form’s position on the screen when application starts Splash screen: first image to appear when application starts

36 Properties of a Windows Form Object (continued)

37 The Toolbox Window Toolbox: –Contains tools used to create an application –Each tool represents a class from which to instantiate objects Controls: –Objects displayed on a form –Are represented as icons in the toolbox –Can be locked in place on the form –Control names use camel casing

38 The Toolbox Window (continued)

39 The Toolbox Window (continued)

40 The Label Tool Label tool: represents a label control Label control: –Displays text that user cannot edit –Used as “prompts” to explain controls or display output

41 The Label Tool (continued)

42 The Label Tool (continued)

43 The Button Tool Button tool: represents a button control Button control: –Performs an immediate action when clicked

44 The Button Tool (continued)

45 The Button Tool (continued)

46 The Code Editor Window Events: user actions while program is running Event procedure: set of instructions to be executed when an event occurs Code editor: used to enter programming code

47 The Code Editor Window (continued)

48 The Code Editor Window (continued)

49 The Code Editor Window (continued)

50 The Code Editor Window (continued) Keyword: has special meaning in a programming language Sub procedure: block of code that performs a task Event’s Procedure header: –Begins with keyword Private –Procedure name includes object name and event name –Handles clause indicates for which objects’ events this code will execute

51 The Me.Close Method Me.Close method: closes the current form Method: predefined VB procedure that can be invoked (called) Sequential processing: each line is executed in sequence

52 The Me.Close Method (continued)

53 Saving a Solution

54 Starting and Ending an Application Startup form: the form to be displayed when the application starts

55 Starting and Ending an Application (continued)

56 Starting and Ending an Application (continued)

57 Starting and Ending an Application (continued)

58 Starting and Ending an Application (continued)

59 Starting and Ending an Application (continued) Executable file: –Can be run outside of Visual Studio 2005 –Has file extension of.exe

60 Starting and Ending an Application (continued)

61 Using an Assignment Statement Assignment statement: assigns a value to a variable or property of a control Assignment operator: the = symbol

62 Using an Assignment Statement (continued)

63 Using an Assignment Statement (continued)

64 Printing Your Code

65 Closing the Current Solution Closing a solution closes all projects and files in that solution

66 Closing the Current Solution (continued)

67 Opening an Existing Solution Only one solution can be open at any one time If a solution is already open, opening a different one will close the currently open solution

68 Opening an Existing Solution (continued)

69 Summary Program: directions given to a computer Programming languages have progressed from machine language to assembly language to high-level languages Compiler: converts high-level languages to machine instructions Object: can be seen, touched, or used Objects have attributes (properties) and behaviors (methods and events)

70 Summary (continued) Class: a pattern from which an object can be instantiated Class encapsulates an object’s attributes and behaviors IDE: interactive development environment Windows Form Designer window: used to create GUI applications Solution Explorer window: shows names of projects and files in the solution

71 Summary (continued) Properties window: sets an object’s property values Name property: used to refer to an object in code Text property of a form: specifies the text to be displayed in the title bar of the form Toolbox: contains tools for creating the GUI Label control: contains text that a user cannot edit Event: occurs when user interacts with GUI elements

72 Summary (continued) Event procedure: the code that runs when an event occurs Button control: performs an immediate action when clicked Code editor: provides code templates for each object’s event procedures