Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Similar documents
Microsoft Visual Basic 2005: Reloaded

Using Visual Basic Studio 2008

LESSON B. The Toolbox Window

LESSON A. The Splash Screen Application

CIS 3260 Intro. to Programming with C#

Visual Basic 2008 The programming part

Dive Into Visual C# 2008 Express

Program and Graphical User Interface Design

INTRODUCTION TO VISUAL BASIC 2010

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Chapter 2 Exploration of a Visual Basic.Net Application

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

2 USING VB.NET TO CREATE A FIRST SOLUTION

Chapter 1: A First Program Using C#

Chapter 2. Creating Applications with Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Welcome Application. Introducing the Visual Studio.NET IDE. Objectives. Outline

REVIEW OF CHAPTER 1 1

Programming Logic and Design Sixth Edition Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs

Programming Logic and Design Seventh Edition Chapter 2 Elements of High-Quality Programs

Chapter 2 Visual Basic, Controls, and Events. 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual Basic Events

GUI Design and Event- Driven Programming

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

Kidspiration Quick Start Tutorial

Starting a new diagram. To start a new diagram, click the Picture button. A new document opens with a Main Idea symbol.

Programming in C# Project 1:

IT 374 C# and Applications/ IT695 C# Data Structures

Microsoft Word 2010 Part 1: Introduction to Word

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

A Beginner s Guide to Programming Logic, Introductory. Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs

Tutorial 2 - Welcome Application Introducing, the Visual Studio.NET IDE

Setting Up a Paper in APA Style Using Microsoft Word 2007

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

Introduction. Programming and

A Guided Tour of Doc-To-Help

Getting started 7. Setting properties 23

Getting started 7. Setting properties 23

Navigate to Cognos Cognos Analytics supports all browsers with the exception of Microsoft Edge.

First Visual Basic Lab Paycheck-V1.0

Visual Basic.NET. 1. Which language is not a true object-oriented programming language?

Chapter 1. Introduction to Programming and Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Corel Ventura 8 Introduction

Test Bank for An Object Oriented Approach to Programming Logic and Design 4th Edition by Joyce Farrell

Tutorial 3 - Welcome Application

Creating custom reports is for advanced users only. It is the sole responsibility of the user to debug any custom reports.

Visual C# Program: Resistor Sizing Calculator

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

CANVAS. Getting Started 1. Follow link Log into Canvas 3. Click Account and select eportfolios

Dive Into Visual C# 2010 Express

ECE 480 Application Note. By: Jacob Hersha 4/3/15. Creating a Sequence of Media with Visual Studio

PowerWorship 4.0 Introduction

How to properly format Word for MLA format and keep it that way!

Introduction to Personal Computers Using Windows 8 Course 01 - Getting to Know PCs and the Windows 8 User Interface

WinView. Getting Started Guide

23 - Report & Export

GIMP ANIMATION EFFECTS

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

SYLLABUS B.Com (Computer) VI SEM Subject Visual Basic Unit I

CIS 3260 Intro. to Programming with C#

Readme. HotDocs Developer LE Table of Contents. About This Version. New Features and Enhancements. About This Version

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

Setting Up a Paper in APA Style Using Microsoft Word 2008 for MACs

Using OMNIS Studio. OMNIS Software

DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5)

Studio2012.aspx

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

Document Editor Basics

COMPUTER TECHNIQUE. ( Vocational Stream ) Paper : IV. [ Desktop Publishing (DTP) ] ( Theory )

Dreamweaver CS 5.5. University Information Technology Services. Training, Outreach, Learning Technologies, and Video Production

17. Introduction to Visual Basic Programming

VARIABLES & ASSIGNMENTS

Enterprise Architect. User Guide Series. Tutorial. Author: Sparx Systems. Date: 26/07/2018. Version: 1.0 CREATED WITH

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

Chapter 6 Setting Defaults

Using Code Templates to enhance software consistency and quality

with TestComplete 12 Desktop, Web, and Mobile Testing Tutorials

IBM ILOG OPL IDE Reference

Key Terms. Differentiation Extended Time Four square

CST242 Windows Forms with C# Page 1

Enterprise Architect. User Guide Series. Tutorial

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Information Technology User Support Services

Introducing Gupta Report Builder

Introduction to PeopleSoft Query. The University of British Columbia

Microsoft Excel 2010 Basic

Microsoft Visual Basic 2015: Reloaded

OUTLOOK ATTACHMENT EXTRACTOR 3

Microsoft Visual Basic 2005: Reloaded

Readme. HotDocs Developer Table of Contents. About This Version. About This Version. New Features and Enhancements

Highline College. Office 2016 Video #01: Introduction to Office 2016 & Windows Explorer

DRAFT. Table of Contents About this manual... ix About CuteSITE Builder... ix. Getting Started... 1

Getting started 7. Storing values 21. Creating variables 22 Reading input 24 Employing arrays 26 Casting data types 28 Fixing constants 30 Summary 32

PowerPoint Spring 2002

Word Select New in the left pane. 3. Select Blank document in the Available Templates pane. 4. Click the Create button.

What is EasyWeb?! 3 EasyWeb QuickStart! 4. Publishing Your Website! 10

Beginner s Guide to ACD5

Contents. More Controls 51. Visual Basic 1. Introduction to. xiii. Modify the Project 30. Print the Project Documentation 35

Microsoft Word Lecture 9. By lec. (Eng.) Hind Basil University of technology Department of Materials Engineering

Adobe InDesign Notes. Adobe InDesign CS3

NiceLabel Designer Standard User Guide

Lab # 02. Basic Elements of C++ _ Part1

Transcription:

Skill Area 336 Explain Essential Programming Concept Programming Language 2 (PL2)

336.2-Apply Basic Program Development Techniques 336.2.1 Identify language components for program development 336.2.2 Use IDE to create an application 336.2.3 Write code to execute tasks 366.2.4 Run and debug a program

The Visual Studio IDE Visual Studio is an integrated development environment, often abbreviated as IDE Provides everything needed to create, test, and debug software including: The Visual Basic language Form design tools to create the user interface Debugging tools to help find and correct programming errors Visual Studio supports other languages beside Visual Basic such as C++ and C#

Visual Studio 2008 (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 Web-based application: Has a Web user interface Runs on a server Accessed with a computer browser

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 piece of the solution A solution may contain one or more projects

Solutions, Projects, and Files (continued) Figure 1-1: Illustration of a solution, project, and file

Starting Microsoft Visual Studio 2008 Figure 1-2: How to start Microsoft Visual Studio 2008

Figure 1-3: Visual Studio 2008 Professional Edition startup screen

Creating a Visual Basic 2008 Windows-Based Application Figure 1-4: How to create a Visual Basic 2008 Windows-based application

Figure 1-5: Completed New Project dialog box

Figure 1-6: Solution and Visual Basic Project created by Visual Studio 2008

Managing the Windows in the IDE Figure 1-7: How to manage the windows in the IDE

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 text boxes to the form to create the GUI Has a title bar with caption and Minimize, Maximize, and Close buttons Tab at top of designer windows has [Designer]

Figure 1-8: Windows Form Designer window

The Solution Explorer Window Solution Explorer window: Displays a list of projects contained in this solution Displays the items contained in each project Figure 1-9: Solution Explorer window

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 Give each form file a meaningful name using the Properties window

The Properties Window Properties: a set of attributes that determine an object s appearance and behavior Properties window: displays properties of selected object Default property values are assigned when an object is created

The Properties Window (continued) Figure 1-10: Properties window showing the properties of the Form1.vb file

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 Use the Alphabetical or Categorized buttons to sort the display of properties Settings box: Right column containing the current value of each property

Properties of a Windows Form Figure 1-11: Windows form properties listed in the Properties window

Properties of a Windows Form (continued) Class definition: block of code that defines the attributes and behaviors of an object All class definitions are contained in namespaces Namespace: defines a group of related classes Dot member access operator: the period that separates words in an object s name to indicate a hierarchy of namespaces Name property: used to refer to an object in code Give each object a meaningful name Hungarian notation: naming convention using three or more character prefix to represent the object type

Properties of a Windows Form (continued) Pascal case: First letter of each word in the name 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 Font: general shape of characters in text Recommended font is Seqoe UI font Point: a measure of font sizes; one point = 1/72 inch

The Toolbox Window Toolbox: Contains objects that can be added to other objects, such as a form Each tool has an icon and a name to identify it Each tool represents an object, called a control Controls: Objects displayed on a form Represented as icons in the toolbox Can be locked in place on the form

The Toolbox Window (continued) Figure 1-12: Toolbox window

The Toolbox Window (continued) Figure 1-13: How to add a control to a form

The Toolbox Window (continued) Figure 1-14: How to manipulate the controls on a form

The Label Control Label control: Displays text that user cannot edit Used as prompts to explain controls or display output Name should end with Label Control names use camel case Camel casing: lowercase first word; uppercase first letter of each subsequent word in the name Not necessary to assign meaningful names for labels used as prompts because they are never used in code Labels used for output should have meaningful names

The Label Control (continued) Figure 1-15: Wizard application s user interface

The Button Control Button control: Performs an immediate action when clicked Its name should end with Button Text property: specifies the text that appears on the button s face

The Picture Box Control Picture box control: used to display an image on a form Image property: specifies the image to display SizeMode property: handles how the image will be displayed Settings: Normal, StretchImage, AutoSize, CenterImage, or Zoom

The Code Editor Window Events: user actions while program is running Examples: clicking, double-clicking, scrolling Event procedure: set of instructions to be executed when an event occurs Tells the object how to respond to an event Code editor: used to enter programming code

The Code Editor Window (continued) Figure 1-16: How to open the Code Editor window

The Code Editor Window (continued) Figure 1-17: Code Editor window opened in the IDE

The Code Editor Window (continued) Class statement: used to define a class Begins with Public Class <class name> Ends with End Class Class Name list box: lists the names of objects (controls) included in the user interface Method Name list box: lists the events to which the selected object is capable of responding When you select a control from the Class Name list box and a method name, a code template for the event appears in the Code Editor window Syntax: rules of the language

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

The Me.Close() Instruction Me.Close() instruction: closes the current form at run time If the current form is the main form, the application is terminated Me keyword: refers to the current form Method: predefined VB procedure that can be invoked (called) when needed Sequential processing: each line is executed in sequence Also called a sequence structure

The Me.Close() Instruction (continued) Figure 1-19: Me.Close() instruction in the Click event procedure

Saving a Solution An asterisk appears on the designer and Code Editor tabs if a change was made since the last time the solution was saved Figure 1-20: How to save a solution

Starting and Ending an Application Startup form: the form to be displayed when the application starts Figure 1-21: How to specify the startup form

Starting and Ending an Application (continued) Figure 1-22: Project Designer window

Starting and Ending an Application (continued) Figure 1-23: How to start an application

Starting and Ending an Application (continued) Figure 1-24: Result of starting the Wizard application

Starting and Ending an Application (continued) When you start a VB application, the IDE creates an executable file Executable file: Can be run outside of Visual Studio 2008 Has a file extension of.exe Stored in the project s bin\debug folder

Starting and Ending an Application (continued) Figure 1-25: How to end an application

Using an Assignment Statement Properties window is used to set property values at design time Assignment statement: assigns a value to a variable or property of a control Used to set property values at run time String: zero or more characters enclosed in quotation marks Assignment operator: the = symbol

Using an Assignment Statement (continued) Figure 1-26: Assignment statements entered in the Code Editor window

Printing Your Application Figure 1-27: How to print an application s code and user interface

Closing the Current Solution Closing a solution closes all projects and files in that solution You are prompted to save any files that have unsaved changes Figure 1-28: How to close a solution

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

Opening an Existing Solution (continued) Figure 1-29: How to open an existing solution

Programming Tutorial Figure 1-46: Result of starting the Wizard application

Programming Example Figure 1-54: User interface