Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.

Slides:



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

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Using Macros and Visual Basic for Applications (VBA) with Excel
Creating an OOED Application
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.
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.
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.
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 1 Introduction to Visual Basic.NET Programming In Visual Basic.NET © 2001 by The McGraw-Hill Companies, Inc. All rights reserved.
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
Chapter 1 Introduction to Visual Basic 2010 Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Outline Review Visual Basic.NET Environment Review Visual Basic.NET Environment First Visual Basic Planning and Programming First Visual Basic Planning.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
 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.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
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.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
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.
Introduction to Visual Basic (VB)
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
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.
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
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.
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 Creating a First Project in Visual Basic.
CC111 Lec7 : Visual Basic 1 Visual Basic(1) Lecture 7.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Introduction to Visual Basic.NET 2008 Chapter 1.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
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.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
BBT 10 Visual Basic 03 Enrichment. Tip Before creating any files for your project, first create a new folder Save all of your files in the folder Pieces.
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.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
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.
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
1. Introduction to Visual Basic
An Introduction to Visual Basic
Visual Basic Project Development Environment
Visual Basic.
Social Media And Global Computing Introduction to Visual Studio
Chapter 2 – Introduction to the Visual Studio .NET IDE
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
Visual Studio.
Presentation transcript:

Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San Diego

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Ch. 1: Introduction to VB  Writing windows applications with VB  Prog. languages: procedural, object oriented, & event driven  Writing VB projects  The VB environment  Writing your first VB project  Finding & fixing errors  Visual Basic help

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Writing Windows Apps. with VB  The Windows GUI Text boxes Frame Labels Option buttons Check boxes Command buttons Image Picture box

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Graphic User Interface  Graphic User Interface (GUI) comprises –Forms –Controls –Event-driven programming

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Prog. Languages: procedural, object oriented, & event driven  The Object Model –Objects (nouns)controls –Properties (adjectives)form1.Caption –Methods (verbs)debug.print  Versions of Visual Basic –Working Model –Learning Edition –Professional Edition –Enterprise Edition

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Planning Visual Basic Projects  The three-step process for planning projects –Design the user interface Sketch the screens with forms and controls needed –Establish the objects' properties Write down the properties for each object –Plan the Basic code Write out pseudocode for actions your program will perform

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Writing Visual Basic Projects  The three-step process for writing projects –Design the user interface Create the forms and controls you previously sketched –Set the objects' properties Give each object a name and set their properties –Write the Basic code Write out Visual Basic code to carry out your application's actions

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Visual Basic Projects  Visual Basic projects create several files –Project file:.VBP Holds the names of other files in the project –Form files:.FRM Each form is saved as a separate file Form file contains a description of a form's objects and the Basic code attached to a form –Standard code module:.BAS (optional) –Custom controls:.OCX (optional) –Form information:.VBW

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill The Visual Basic Environment  Form, Project Explorer, Properties, and Form Layout Windows  Toolbox  Main Visual Basic window  Toolbar, Form location & size information  Help  Design-, Run-, and Break Time

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill The Toolbox  Tool box contents vary based on which version of Visual Basic you are running.  Toolbox contains a common set of tools across all VB versions

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill The Visual Basic Toolbar  The buttons on the toolbar are shortcuts  Toolbar buttons are a quick way to activate frequently used commands  Each button stands for a command that you can also select a the Visual Basic menu

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Writing Your First VB Project  Set up your Visual Basic workspace  Define user interface  Set properties  Write code  Visual Basic code statements  Run, save, open, modify, & print the Hello World project  Documentation

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Set Up Your VB Workspace  Set up Options to reflect these settings:

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Define the User Interface  Resize the form –Drag the lower-right handle to enlarge the form –Drag any handle in the middle of a side to enlarge the form in that direction only  Place controls on the form –Click the label tool –Click and drag the mouse (a crosshair) to place the control on the form

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Set Properties  Set the Name and Caption properties –Always set the Name property before writing code –Next, set the Caption property  The Name property identifies the object internally--so you can refer to it in code  The Caption property externally idenfities an object

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Write Code  You write code enclosed in event procedures, which respond to typical VB events. Private Sub cmdPush_Click()... (your code goes here) End Sub  VB automatically supplies the event procedure Sub/End Sub statements

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Visual Basic Code Statements  Remark statement is any code line beginning with an apostrophe  Assignment statement  End statement

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Code the Event Procedures for Hello World  Write the Push event code for the Push Me button (cmdPush)  Write the Push event code for the Exit button (cmdExit)

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Run/Save/Open/Modify the Project  Test the project: –Click Run, Start (or click the Start button on the toolbar) –Click the Push Me button –Click the Exit button  Save the project and the form  Make modifications to the form  Print the project documentation: –Form Image, Code, and Form as Text

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Finding & fixing errors  Compile (syntax) errors  Run-Time (semantic) errors  Logic errors  Project Debugging

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Naming Conventions  Objects have special prefixes that help identify the object's general type  Programmers follow the conventions because it simplifies coding and debugging  Never use default names for objects

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Visual Basic Help  Help includes all of the Microsoft Developer Network (MSDN) library.  The Working Model does not contain the extensive MSDN facilities  Access MSDN online at