January 10, 2005 Lecture1 - M. Lin 1 Distance Learning Center Lecture 1 Introduction to Visual Basic Programming.

Slides:



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

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
© 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,
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
Chapter 1 Introduction to Visual Basic.NET Programming In Visual Basic.NET © 2001 by The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 1 Introduction to Visual Basic 2010 Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
 Visual Basic is an object-oriented language used to write application programs that run in Windows or on the Internet using a graphical user interface.
Introduction to Programming and Visual Basic
Chapter 1 Introduction to Programming and C# Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Lecture 2 Introduction to Visual Basic.NET Programming Appreciation.
A First Program Using C#
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:
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Introduction to Visual Basic (VB)
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 1: ASP.Net Dave Mercer.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Microsoft Visual Basic 2005: Reloaded Second Edition
An Introduction to Visual Basic
IE 411/511: Visual Programming for Industrial Applications
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Visual C++ Programming: Concepts and Projects
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
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.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Introduction to Visual Basic.NET 2008 Chapter 1.
Using Microsoft Visual Studio.NET Click on -> Start Click on -> Start Choose -> All Programs Choose -> All Programs Choose -> Microsoft Visual Studio.NET.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Chapter 1 Introduction to Visual Basic.NET Programming In Visual Basic.NET © 2001 by The McGraw-Hill Companies, Inc. All rights reserved.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Introduction to Visual Basic 2008 Chapter 1.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
COMPUTER III. Fundamental Concepts of Programming Control Structures Sequence Selection Iteration Flowchart Construction Introduction to Visual Basic.
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 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Dive Into® Visual Basic 2010 Express
Chapter 2: The Visual Studio .NET Development Environment
Introduction to Visual Basic 2008 Programming
1. Introduction to Visual Basic
Chapter 2 – Introduction to the Visual Studio .NET IDE
CIS16 Application Development Programming with Visual Basic
CIS16 Application Development – Programming with Visual Basic
An Introduction to Computers and Visual Basic
Presentation transcript:

January 10, 2005 Lecture1 - M. Lin 1 Distance Learning Center Lecture 1 Introduction to Visual Basic Programming

January 10, 2005 Lecture1 - M. Lin 2 Lecture 1: Introduction Introduction – Learning objectives of the class Introduction – Learning objectives of the class Installation of Visual Studio.NET2005 Installation of Visual Studio.NET2005 Introduction to Visual Basic.NET2005 Introduction to Visual Basic.NET2005 Basic Concept of Visual Basic Programming LanguageBasic Concept of Visual Basic Programming Language Programming EnvironmentProgramming Environment Use Microsoft Visual Studio.NET2005 Use Microsoft Visual Studio.NET2005

January 10, 2005 Lecture1 - M. Lin 3

January 10, 2005 Lecture1 - M. Lin 4 Learning Objectives Visual program design and development Visual program design and development Fundamentals of Object Oriented Programming (OOP) Fundamentals of Object Oriented Programming (OOP) Event driven programming Event driven programming Objects, properties and methods Objects, properties and methods Write Visual Basic projects Write Visual Basic projects Windows History: Windows 1.0

January 10, 2005 Lecture1 - M. Lin 5 Text Book & References Text book: Text book: Programming in Visual Basic.NET – 2005 Update Edition by Julia Case Bradley and Anita C. Millspaugh, McGraw-Hill, ISBN Programming in Visual Basic.NET – 2005 Update Edition by Julia Case Bradley and Anita C. Millspaugh, McGraw-Hill, ISBN References: References: Online Learning Center: Learning Center: Microsoft VB.NET Homepage: VB.NET Homepage: VB developers Resource Center: developers Resource Center: Microsoft Developers Network Homepage for VB.NET: Developers Network Homepage for VB.NET: Paul D. Sheriff, PDSA, Inc.Paul D. Sheriff, PDSA, Inc. A Web Introduction to VS.NET A Web Introduction to VS.NET MSDN Home pageMSDN Home page

January 10, 2005 Lecture1 - M. Lin 6 Installing Microsoft Visual Studio.NET System requirements 2.Install the Microsoft Visual Studio.NET framework This is one of the Windows XP updates, listed as “recommended”This is one of the Windows XP updates, listed as “recommended” 3.Insert the Microsoft Visual Studio.NET CD Approximately 2 GBytes of disk space is usedApproximately 2 GBytes of disk space is used Help files (MSDN) are valuableHelp files (MSDN) are valuable Can also install C++ & C# if desiredCan also install C++ & C# if desired 4.Follow items 1, 2, and 3 on the setup screen to complete your installation Microsoft VS.NET System Requirements Page Microsoft VS.NET System Requirements Page

January 10, 2005 Lecture1 - M. Lin 7 Overview of Programming The Structure and Operation of a Computer Computer system: hardware and software Computer system: hardware and software Processor (registers, primitive operations) Processor (registers, primitive operations) Main memory (RAM, ROM) Main memory (RAM, ROM) Data types (integers, real, floating-point numbers, strings, etc.) Data types (integers, real, floating-point numbers, strings, etc.) Sequence and Data Control Sequence and Data Control Storage management Storage management Operating environment Operating environment Reference: Computer Functions and Applications, by P. Lin

January 10, 2005 Lecture1 - M. Lin 8 Computer System (PC) HardwareSoftware Processor, Memory Data types, Sequence and Data Control, Storage Management, Operating Environment Overview of Programming (continue)

January 10, 2005 Lecture1 - M. Lin 9 Major Components of Computer Systems Input Unit (keyboard, mouse, scanner, Internet through TCP/IP) Input Unit (keyboard, mouse, scanner, Internet through TCP/IP) Central Processing Unit (CPU) Central Processing Unit (CPU) Output Unit Output Unit Memory Unit Memory Unit Primary memory (RAM, ROM)Primary memory (RAM, ROM) Secondary memory (Hard drives, zip disks, floppy disks, etc)Secondary memory (Hard drives, zip disks, floppy disks, etc)

January 10, 2005 Lecture1 - M. Lin 10 Object Technology Objects are essentially reusable software components that model items in the real world, such as windows cars, vehicles, and so on Objects are essentially reusable software components that model items in the real world, such as windows cars, vehicles, and so on Object technology is a packaging scheme that enables programmers to create meaningful software units. Object technology is a packaging scheme that enables programmers to create meaningful software units. Object-Oriented Programming tends to produce software that is more understandable, better organized, and easier to maintain, modify and debug. Object-Oriented Programming tends to produce software that is more understandable, better organized, and easier to maintain, modify and debug.

January 10, 2005 Lecture1 - M. Lin 11 Object Model Object ==> Noun Object ==> Noun Form and ControlsForm and Controls Property ==> Adjective Property ==> Adjective Color of a FormColor of a Form Method ==> Verb Method ==> Verb Move a FormMove a Form Event ==> Occurs when the user takes an action Event ==> Occurs when the user takes an action User clicks a button, User moves a formUser clicks a button, User moves a form Class ==> Template to create new object Class ==> Template to create new object Each control added is an Instance of a ClassEach control added is an Instance of a Class

January 10, 2005 Lecture1 - M. Lin 12 Dot Notation Used to reference object's properties and events in code Used to reference object's properties and events in code Object dot PropertyObject dot Property Form.Text, TextBox.Text Form.Text, TextBox.Text Object dot EventObject dot Event Form.Hide( ), TextBox.Focus( ) Form.Hide( ), TextBox.Focus( ) To reference an object's events use an underscore instead of a dot To reference an object's events use an underscore instead of a dot Button_Click, ListBox_TextChanged Button_Click, ListBox_TextChanged

January 10, 2005 Lecture1 - M. Lin 13 Object Model Analogy Class = automobile Class = automobile Properties = make, model, color, year Properties = make, model, color, year Object = each individual car Object = each individual car Object is also an Instance of the automobile classObject is also an Instance of the automobile class Methods = start, stop, speedup, slowdown Methods = start, stop, speedup, slowdown Events = car arrives, car crashes Events = car arrives, car crashes

January 10, 2005 Lecture1 - M. Lin 14 Visual Basic.NET Programming Learning Visual Basic.NET Programming Language includes to learn: Learning Visual Basic.NET Programming Language includes to learn: The graphical user interface or GUI (“gooey”) which is an essential component of visual programmingThe graphical user interface or GUI (“gooey”) which is an essential component of visual programming The GUI defines how various elements look and function The GUI defines how various elements look and function Visual Basic programming languageVisual Basic programming language Microsoft Developers Network Homepage for VB.NET:

January 10, 2005 Lecture1 - M. Lin 15 A Sample Graphical User Interface (GUI) Label GroupBox RadioButto ns TextBox PictureBox Buttons Form

January 10, 2005 Lecture1 - M. Lin 16 VB.NET Program Development To create a VB.NET program you will utilize the Visual Basic.NET 2005 development environment, and you will To create a VB.NET program you will utilize the Visual Basic.NET 2005 development environment, and you will create a window, called formcreate a window, called form select elements, which are classes, from a toolbox and place them within the window, called controlsselect elements, which are classes, from a toolbox and place them within the window, called controls write code for each object that you place on the window that defines how the object responds to various events, called object- oriented programming (OOP).write code for each object that you place on the window that defines how the object responds to various events, called object- oriented programming (OOP).

January 10, 2005 Lecture1 - M. Lin 17 Event-Driven Programming The style of Execution as shown below is called event-driven: The style of Execution as shown below is called event-driven: A GUI determines how a user interacts with the programA GUI determines how a user interacts with the program Each user interaction with the computer: pressing a key, clicking a button, or selecting a menu item causes an event to occurEach user interaction with the computer: pressing a key, clicking a button, or selecting a menu item causes an event to occur Whenever an event occurs, the code you have written to handle that event is executedWhenever an event occurs, the code you have written to handle that event is executed

January 10, 2005 Lecture1 - M. Lin 18 VB.NET Object Oriented Programming Using the VB.NET OOP Technology to work with objects and develop an event-driven program. Using the VB.NET OOP Technology to work with objects and develop an event-driven program. Each object consists of: Each object consists of: Classes: Forms, Labels, Buttons, etcClasses: Forms, Labels, Buttons, etc Objects: A particular Form, Label, Button, etc.Objects: A particular Form, Label, Button, etc. Properties (attributes of an object): The Name of a form, the Text in a Label, etc.Properties (attributes of an object): The Name of a form, the Text in a Label, etc. Methods (the actions that an object performs in response to GUI events): Close, Show, Clear, etc.Methods (the actions that an object performs in response to GUI events): Close, Show, Clear, etc. Event: when a user takes an actionEvent: when a user takes an action

January 10, 2005 Lecture1 - M. Lin 19 About Visual Studio.NET Framework Visual Studio.NET 2005 includes: Visual Studio.NET 2005 includes: Visual Basic, Visual C++, C#, J#, and the.NET framework.Visual Basic, Visual C++, C#, J#, and the.NET framework. The.NET framework allowing objects from different languages to operate togetherThe.NET framework allowing objects from different languages to operate together The.NET languages-based programs all compile to a common machine language, called Microsoft Intermediate Language (MSIL)The.NET languages-based programs all compile to a common machine language, called Microsoft Intermediate Language (MSIL) The MSIL code runs in the Common Language Runtime (CLR), which is part of the file.NET framework.The MSIL code runs in the Common Language Runtime (CLR), which is part of the file.NET framework.

January 10, 2005 Lecture1 - M. Lin 20 About Visual Basic.NET Framework Visual Basic.NET 2005 provide: Visual Basic.NET 2005 provide: Object-Oriented Programming (OOP) solutions and with increased object-oriented capabilitiesObject-Oriented Programming (OOP) solutions and with increased object-oriented capabilities allowing for easier development of Web-based applicationsallowing for easier development of Web-based applications interoperability with other languagesinteroperability with other languages Major changes (to VB. NET) have been made, both to the language syntax and the way that data are stored and referenced Major changes (to VB. NET) have been made, both to the language syntax and the way that data are stored and referenced

January 10, 2005 Lecture1 - M. Lin 21 VB.NET Program Development Process Planning (design) Planning (design) design the GUI (user interface)design the GUI (user interface) list the objects and properties neededlist the objects and properties needed plan the event procedures (what the code does)plan the event procedures (what the code does) Programming (implementation) Programming (implementation) define the GUI using objects (Forms, Text Boxes, Labels, etc.define the GUI using objects (Forms, Text Boxes, Labels, etc. set the propertiesset the properties write BASIC code to implement procedureswrite BASIC code to implement procedures

January 10, 2005 Lecture1 - M. Lin 22 VB.NET Application Files Each Visual Basic application create the following files with extensions: Each Visual Basic application create the following files with extensions:.sln - a solution file that holds information about the project. This is the only file that is opened.sln - a solution file that holds information about the project. This is the only file that is opened.suo - a solution user options file that stores information about the selected options.suo - a solution user options file that stores information about the selected options.vb - a.vb file that holds the definition of a form.vb - a.vb file that holds the definition of a form.resx - a resource file for the form.resx - a resource file for the form.vbproj - a project file that describes the project and lists the files are included.vbproj - a project file that describes the project and lists the files are included.vbproj.user - a project user option file that holds project option settings.vbproj.user - a project user option file that holds project option settings

January 10, 2005 Lecture1 - M. Lin 23 Using Microsoft Visual Studio.NET Click on -> Start Click on -> Start Choose -> All Programs Choose -> All Programs Choose -> Microsoft Visual Studio.NET 2005 Choose -> Microsoft Visual Studio.NET 2005 Click on -> Microsoft Visual Studio.NET 2005 Click on -> Microsoft Visual Studio.NET 2005

January 10, 2005 Lecture1 - M. Lin 24 Using Microsoft Visual Studio.NET (continue) Click on- > FileClick on- > File Choose- > NewChoose- > New Select-> ProjectSelect-> Project

January 10, 2005 Lecture1 - M. Lin 25 Using Microsoft Visual Studio.NET (continue) Select -> Visual Basic Projects Select -> Visual Basic Projects Select -> Window Application Select -> Window Application Give a Project Name Give a Project Name Specify the appropriate location Specify the appropriate location

January 10, 2005 Lecture1 - M. Lin 26 Using Microsoft Visual Studio.NET (continue) The Microsoft VS Development Environment is also called integrated development environment (IDE): A form designerA form designer A code editorA code editor A compilerA compiler A debuggerA debugger An object browserAn object browser A Help facilityA Help facility

January 10, 2005 Lecture1 - M. Lin 27 Using Microsoft Visual Studio.NET (continue) Each window can be moved, resized, opened, closed, or customized Each window can be moved, resized, opened, closed, or customized Menu bar Menu bar Toolbar Toolbar Menu bar Toolbar

January 10, 2005 Lecture1 - M. Lin 28 VB.NET – IDE Main Window Form window Properties window Solution Explorer window Menu bar Tabs Toolbox Tool bar

January 10, 2005 Lecture1 - M. Lin 29 Toolbox Click Toolbox from the Toolbars Click Toolbox from the Toolbars Toolbox contains a list of tools that helps to design projects Toolbox contains a list of tools that helps to design projects

January 10, 2005 Lecture1 - M. Lin 30 Solution Explorer View Code View Code View Design/ View Design/Form Properties Properties welcome.sln Tool bar

January 10, 2005 Lecture1 - M. Lin 31 Properties

January 10, 2005 Lecture1 - M. Lin 32 ' Display the Hello World message. Remark Statement Also known as Comment, used for documentation Also known as Comment, used for documentation Non-executable Non-executable Automatically colored Green in Editor Automatically colored Green in Editor Begins with an apostrophe ( ' ) Begins with an apostrophe ( ' ) On a separate line from executable codeOn a separate line from executable code At the right end of a line of executable codeAt the right end of a line of executable code

January 10, 2005 Lecture1 - M. Lin 33 Option Strict On

January 10, 2005 Lecture1 - M. Lin 34 Visual Studio Help Extensive Help feature includes Microsoft Developer Network library (MSDN) Microsoft Developer Network library (MSDN) Entire reference manual Entire reference manual Coding examples Coding examples Filter MSDN help to display VB topics only Filter MSDN help to display VB topics only Run MSDN from hard drive, CD or Web Run MSDN from hard drive, CD or Web To view Help choose Contents, Index or Search from Help Menu To view Help choose Contents, Index or Search from Help Menu Context-Sensitive Help is available by pressing F1 Context-Sensitive Help is available by pressing F1

January 10, 2005 Lecture1 - M. Lin 35 Help Menu

January 10, 2005 Lecture1 - M. Lin 36 Help Menu (continued) Select an appropriate subjectSelect an appropriate subject

January 10, 2005 Lecture1 - M. Lin 37 Summary Introduction – Learning Objectives of the class Introduction – Learning Objectives of the class Installation of Visual Studio.NET2005 Installation of Visual Studio.NET2005 Introduction to Visual Basic.NET2005 Introduction to Visual Basic.NET2005 Basic Concept of Visual BasicBasic Concept of Visual Basic Visual Basic Programming LanguageVisual Basic Programming Language Use Microsoft Visual Studio.NET2005 Use Microsoft Visual Studio.NET2005 Next - First Visual Basic Planning and Programming Next - First Visual Basic Planning and Programming

January 10, 2005 Lecture1 - M. Lin 38 Question?