Visual Basic Project Development Environment

Slides:



Advertisements
Similar presentations
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Advertisements

Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
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.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.net IDE. Integrated Development Environment.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
Introduction to Visual Basic (VB)
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
Appendices A - F A-F Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
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?)
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.
Program Design and Coding
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
§Visual - A method used to create GUI applications. §BASIC - Beginner’s All - purpose Symbolic Instruction Code developed by John Kemeny. §VB- Evolved.
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.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter Two Creating a First Project in Visual Basic.
CC111 Lec7 : Visual Basic 1 Visual Basic(1) Lecture 7.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Chapter 2 – Introduction to the Visual Studio .NET IDE
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.
1 Introduction to Visual Basic Dr Mohd Nabil Almunawar MS 3403 Advanced Computing.
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.
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.
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
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 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: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
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.
Dive Into® Visual Basic 2010 Express
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Chapter Topics 15.1 Graphical User Interfaces
Chapter 2 – Introduction to the Visual Studio .NET IDE
An Introduction to Computers and Visual Basic
1. Introduction to Visual Basic
An Introduction to Computers and Visual Basic
Program and Graphical User Interface Design
Chapter 7 Advanced Form Techniques
Visual Basic.
Social Media And Global Computing Introduction to Visual Studio
Chapter 2 – Introduction to the Visual Studio .NET IDE
CIS16 Application Development Programming with Visual Basic
Visual Basic Project Development Environment
Visual Studio.
An Introduction to Computers and Visual Basic
Chapter 15: GUI Applications & Event-Driven Programming
Understanding the Integrated Development Environment
Chapter 4 Enhancing the Graphical User Interface
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

Visual Basic Project Development Environment Introduction 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Introduction A brief Basic history. What is an event-driven language? Visual Basic’s unique concepts. Basic stands for Beginner’s all-purpose symbolic instructional code. It was designed as a text based language. It did not resemble the graphical language most of us have grown accustom to. When Microsoft made the decision to use Basic as their primary language, and supply it with their DOS environment, they went through several incarnation of BASIC. First came MSBASIC, then GWBASIC (Gee Whiz BASIC), BASICA, QuickBASIC, and Qbasic (still included in the windows operating system disks). Through all these evolutionary changes Microsoft kept the basic structure adding new and more powerful commands and functions. They also kept the interpreted structure of the language as apposed to converting to a compiled language. 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Lecture Topics The process of visual program design Objects, Properties, and Methods The three step method (which will be used) 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Process of Design Using VB to produce program applications that run in the windows environment. Event-driven. Cycle. Cycle Output Event-Driven When a VB program runs 1. What the user sees is a form and its controls 2. When the user clicks on a control with the mouse, types data into a text box, or presses the tab key the program changes 3. Each of these actions is called an event. Event-Driven – means that the user decides which control or object presented on the screen to activate. This is done by pointing to a control button, menu item, or input object with the mouse or using the tab key to advance from object to object on the form. Each time the user selects an object we call that an event. The basic code associated with that object will be activated at this time and will remain active until another object or control button is activated. The programming cycle includes InputProcessingoutput Input Process Test Debug Analyze Design 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Programming cycle 1. The cycle begins with the output 2. The next step consists of identifying the data needed to produce the output 3. Last step, determine how to process the input to achieve the output desired 11/9/2018 Prepared By: Deborah Becker

Vocabulary (good test items) Objects—things or nouns Forms & Controls Properties—tell something about the object Color, size, location, behavior Form1.Caption Form1.Width Methods—actions associated with objects Print, Move, Resize, and Clear Form1.Print (sends output to Form1) Printer.Print (sends output to the printer) Objects 1. Forms– are the windows and dialog boxes 2. Controls– are elements that are placed inside the form Text boxes, command buttons, and list boxes Properties 1. Property references include the name of the object, a period, and the property Methods 1. They are the verbs of the OO language 11/9/2018 Prepared By: Deborah Becker

The Three Step Planning Process Design the user interface Plan the properties Plan the basic code 1. Design the user interface --Decide what your application is going to do by creating an over all design. --Create the visual portion of your application (the screens and menus that you intend to incorporate into the project. 2. Plan the properties --After you have designed your screens and menu, fill out a property sheet for each of the object and controls on you screens and menus. 3. Plan the basic code --During the planning phase you will develop flow charts, Pseudocode, and Hierarchy charts. 11/9/2018 Prepared By: Deborah Becker

The Three Steps Programming Construct the user interface Set the properties Write (add) the basic code (from your Pseudocode) All these plans become your documentation after the project is completed. The more documentation and detailed the planning steps are, the less time you will spend coding your project. If your fail to plan you plan to fail. Any project turn into me without documentation will be give a maximum of 50%. Programming examples 1. Define the user interface 2. Set the properties 3. Write the basic code 11/9/2018 Prepared By: Deborah Becker

Forms for program design are located on the Webct website. Use these forms during your planning stage. 11/9/2018 Prepared By: Deborah Becker

The Visual Basic Working Environment 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Topics The parts of the Visual Basic environment How to place controls on a form How to save your project and its files The Property window’s features Accessing the code window 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The New project window 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The New Project Window 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The Toolbar Visual Basic has four toolbars Debug Edit Form Editor Standard Debug – this toolbar is used during interactive debugging to trace and correct problems Edit – is used to edit your visual basic code Form editor – is used to adjust objects on your forms Standard – this is the default tool bar that appears beneath the menu bar when you start visual basic 6. 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The toolbox Pointer Picture box Text box Label Frame button Check box Option button Horizontal and vertical Scroll bars Image box Data Control 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The Form Window 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Project Window Projects Forms Modules Class Modules User Controls User Documents Property Pages Projects – An application may consist of several projects. Multiple project files will be created when you create ActiveX Controls. Project files always have the filename extension (.VBP) Forms – The project window always contains a list or your forms. Form files always have the extension (.FRM) Modules – Your project’s modules hold general and reusable routines of Visual Basic programming statements. You can use the same module in several programs due to its general nature. Modules always have the file extension (.BAS). Class Modules – Class modules are special code modules that define objects you’ve designed for a project. Class module files always have the extension (.CLS) User Controls – User controls are ActiveX controls that you have added to the project. ActiveX files always have the extension (.OCX). User Documents – User documents are document 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker The Property Window Each property has a name and a value Default names are assigned as you add controls Command1 Always Rename Always rename controls after you have placed the in the form window. 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Naming Conventions Objects Prefix Example Form frm ... frmDataEntry Command Button  cmd ... cmdCalculate Label lbl ... lblTotalDue Text Box txt ... txtLastName Option Button opt … optPaid Check Box  chk … chkJuniorLevel Frame fra … fraCustomerData Horizontal Scroll hsb … hsbPrice Vertical Scroll  vsb … vsbDiscount Image img … imgEmployee Picture Box pic … picOutput Combo Box cbo … cboBeverage List Box lst … lstSalad Shape  shp … shpLayout Look at the handout on naming conventions. These conventions are standards set by Microsoft and the Industry. The perform two valuable functions for your. The help you to read your code more easily. You can identify objects with in the code by the prefixes. By using the standards set by the industry you will find that it is easier to modify your code or someone else's. 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Getting Help Visual Basic Help Assistants and Wizards Search HTML pages Index ON-line 11/9/2018 Prepared By: Deborah Becker

Placing Controls on a Form From the toolbox Click the control you desire Crosshairs Double-Click Default Center of form 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Writing The code Double click On an object Click View on The toolbar 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Types of VB Statements Remark statements ‘Gives additional information to clarify the project Assignment statements [let] Object.Property = value End statement End Halts the program Remarks are internal documentation for your program. They help you to identify what each module was designed to do. They help make programs easier to maintain. Assign statements or let statements are used to assign value to objects and variables. Other syntax statements include End. Each program your write for this class must contain an end statement that exit the program. 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Sample Code 11/9/2018 Prepared By: Deborah Becker

Errors, Errors Mi Kingdumb 4 Ann Error Complier errors (syntax) Run-time errors (naming errors, etc) Logic errors (incorrect placement of instructions) 11/9/2018 Prepared By: Deborah Becker

Prepared By: Deborah Becker Summary About Visual Basic Project Planning and Design Walked through the Components of the VB environment Assignment Read chapter two 11/9/2018 Prepared By: Deborah Becker

Where to Get More Information Our Web-Page Come to class Read your book, web electronic sources 11/9/2018 Prepared By: Deborah Becker