VB Controls and Events. Introduc)on. Program Planning and Flowcharts Visual Basic Visual basic Interface VB Controls CreaGng a Project



Similar documents
Chapter 1 An Introduction to Computers and Problem Solving

PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms

ALGORITHMS AND FLOWCHARTS. By Miss Reham Tufail

Chapter 12 Programming Concepts and Languages

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Instructor Özgür ZEYDAN (PhD) CIV 112 Computer Programming

Notes on Algorithms, Pseudocode, and Flowcharts

2 SYSTEM DESCRIPTION TECHNIQUES

ALGORITHMS AND FLOWCHARTS

Microsoft Excel 2013 Tutorial

Publisher 2010 Cheat Sheet

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

FORMATTING OVERVIEW GUIDELINES FOR YOUR THESIS OR DISSSERTATION FOR SUBMISSION TO THE GRADUATE SCHOOL

Lecture 2 Mathcad Basics

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

The VB development environment

Q&As: Microsoft Excel 2013: Chapter 2

Barcode Based Automated Parking Management System

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

Understanding Start-Up Costs

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Chapter 13: Program Development and Programming Languages

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

TWAIN Driver Reference Guide

LAB 06: Impulse, Momentum and Conservation

Perfion Output Using Special Barcode fonts

Flowchart Techniques

Designing a Graphical User Interface

COWLEY COLLEGE & Area Vocational Technical School

K-Means Clustering Tutorial

Flowcharting, pseudocoding, and process design

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Microsoft Excel 2007 Level 2

1. a procedure that you perform frequently. 2. Create a command. 3. Create a new. 4. Create custom for Excel.

Fundamentals of Programming and Software Development Lesson Objectives

imc FAMOS 6.3 visualization signal analysis data processing test reporting Comprehensive data analysis and documentation imc productive testing

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. CIV 112 Computer Programming Lecture Notes (1)

Microsoft Word 2010 Tutorial

How to Make the Most of Excel Spreadsheets

Chapter 14. Programming and Languages. McGraw-Hill/Irwin. Copyright 2008 by The McGraw-Hill Companies, Inc. All rights reserved.

CPS122 Lecture: State and Activity Diagrams in UML

CREATING BANNERS & IMAGES USING MS PAINT & ANIMATED PROGRAMS

DOVER-SHERBORN HIGH SCHOOL PROGRAM OF STUDIES

Handout: Word 2010 Tips and Shortcuts

Algorithm and Flowchart Structured Programming 1

Microsoft Word 2010 Prepared by Computing Services at the Eastman School of Music July 2010

KS3 Computing Group 1 Programme of Study hours per week

Website Builder Overview

Manual. Sealer Monitor Software. Version

CREATING BANNERS & IMAGES USING MS PAINT & ANIMATED PROGRAMS

Scatter Plots with Error Bars

MICROSOFT WORD TUTORIAL

Visual Logic Instructions and Assignments

Excel Budget Homework

University of Arkansas Libraries ArcGIS Desktop Tutorial. Section 2: Manipulating Display Parameters in ArcMap. Symbolizing Features and Rasters:

ESRI China (Hong Kong) Limited

Midterm Exam #2 Solutions November 10, 1999 CS162 Operating Systems

Excel Formatting: Best Practices in Financial Models

Pro/ENGINEER Wildfire 4.0 Basic Design

Excel 2007 Basic knowledge

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)

BRAZOSPORT COLLEGE LAKE JACKSON, TEXAS SYLLABUS ITSE 1432 INTRODUCTION TO VISUAL BASIC.NET PROGRAMMING

Introduction to the Visual Studio.NET IDE

Conditionals: (Coding with Cards)

How to Format a Spreadsheet. provided by the OpenOffice.org Documentation Project

COMPUTER SCIENCE TRIPOS

Chapter 13: Program Development and Programming Languages

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Microsoft Word 2013 Tutorial

A Guide to Process Mapping

Optimising Your EAMS through Business Processes. Wyhan Jooste

HOW TO MAKE A TABLE OF CONTENTS

How to Develop Accessible Linux Applications

Chapter 3 Problem Solving

imc FAMOS 6.3 visualization signal analysis data processing test reporting Comprehensive data analysis and documentation imc productive testing

INTRODUCTION to ESRI ARCGIS For Visualization, CPSC 178

FLORIDA STATE COLLEGE AT JACKSONVILLE COLLEGE CREDIT COURSE OUTLINE. Introduction to Programming with Visual Basic.NET

Quick Start Guide. Microsoft Publisher 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

CS 40 Computing for the Web

Computer Science 210: Data Structures. Introduction

Sources: On the Web: Slides will be available on:

Syllabus for CS 134 Java Programming

Gadget: A Tool for Extracting the Dynamic Structure of Java Programs

How to Create a Spreadsheet With Updating Stock Prices Version 3, February 2015

Programmable Logic Controllers Definition. Programmable Logic Controllers History

3. Add and delete a cover page...7 Add a cover page... 7 Delete a cover page... 7

Software development and programming. Software

South Plainfield Public Schools Web Design Scope and Sequence of Curriculum Grade Date August 2011

Using Visual Logic with Pseudocode to Teach an Introductory Programming Course

As in the example above, a Budget created on the computer typically has:

2. Capitalize initial keyword In the example above, READ and WRITE are in caps. There are just a few keywords we will use:

Using Process Mapping to Analyze Workflows in Technical Services

Transcription:

CE 311 K Introduc/on to Computer Methods VB Controls and Events Daene C. McKinney Introduc)on Program Planning and Flowcharts Visual Basic Visual basic Interface VB Controls CreaGng a Project 1

Why Visual Basic? #1 Reasons Graphical User Interface (GUI) - easily constructed More fun for students than other languages! The other reasons General purpose, machine- independent language Powerful and flexible language Popular (used by many programmers, it s been around since. well MS DOS. Yeah, Bill Gates wrote it!) Portable (works on all PC s) Small language (few components) Modular (easily maintainable) VB Programs Developing a VB Program Design the GUI (bu^ons, text boxes, etc.) Determine the events that the controls (bu^ons, etc.) will recognize Write the procedures for those events Running a VB Program VB monitors the controls in the window for events When it detects an event, execute procedure for that event Return to monitoring Sounds easy, but it can be frustragng! What s an EVENT? CLICK! What s a PROCEDURE? RUN? Is this a race? 2

Flowchar)ng This can save your &^%$ when you lose track of what you re doing! Flowchart Graphic representagon of the sequence of steps in a process Flowchart Symbols Start/Stop Line Input/Output Processing Start Decision yes Process no Decision Stop Example: Stamp Problem Flowchart Start Read sheets Set stamps = sheets/5 Round stamps up To next whole # Display stamps Input Processing Processing Output Pseudocode Program Purpose: Determine the proper number of stamps for a lecer Read sheets Set the number of stamps to sheets/5 Round the number of stamps up to the next whole number Display the number of stamps End 3

Decisions Flowchart Pseudocode No Process Step(s) 2 Is condigon True? Yes Process Step(s) 1 If condigon is true, then Process step(s) 1 Else Process step(s) 2 End if Average Grade Problem Flowchart Pseudocode Start BEGIN Average Grade Sum=0 Count = 0 sum=0 count = 0 Sum = Sum + Grade Count = Count + 1 Input Grade Input Grade LOOP WHILE grade > 0 sum = sum + grade count = count +1 END LOOP Note: This program will crash if there are no grades input, i.e., count = 0 Yes More grades? No Average = Sum/Count Stop average = sum/count END Average Grade Note: We can translate this pseudocode into any programming language. 4

VB Interface New Project Bu^on Crea)ng a New Project in VB Windows Forms ApplicaGon 5

VB Form Designer Window Project Controls Form To acgvate controls, select Toolbox and press Push- Pin VB Form Designer Window Project Controls Form 6

A LiCle Visual Basic Controls Picture boxes (pic) Text boxes (txt) Bu^ons (cmd) Visual Basic Objects Useful Objects List Boxes Text Boxes Picture Boxes Labels Bu^ons Useful Object Proper)es Name CapGon Border style Visible Back Color Alignment Font 7

Visual Basic Events When a VB program runs A Form and some Controls appear on the screen Nothing happens ungl user takes an acgon Event Most Events are associated with Controls Objects Programmer writes Code to respond to events Procedures Boxes and BuCons VB: Object- oriented language Objects: Controls Text boxes, Picture boxes, Bu^ons, etc Procedures: tasks that objects perform Dot separates object name from method (TextBox1.TEXT) Method: Assign text to a text box BuCon BuCon code 8

Crea)ng a Visual Basic Program 1. IdenGfy Problem 2. Design Algorithm 3. Design GUI (interface) 4. Create Objects 5. Set ProperGes 6. Write Procedures for Events (bu^on clicks, etc.) 7. Test Your Program IdenGfy Problem Design Algorithm Design GUI Create Objects Set ProperGes of Objects Write Procedures for Events Test Homeworks Install VB- 2008 from the MS website or the CD at back of the book Do Homework problems in VB Learn How to create VB projects and solve problems Make Screenshots and paste them into Word docs Use Your computer 9

Summary Program Planning and Flowcharts Visual Basic Visual basic Interface VB Controls CreaGng a Project 10