Introduction 1. CIS 400 Programming for the Windows Environment 2.

Slides:



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

Information System Design Lab 5&6. User Interface Design.
Chapter 2 –Visual Basic, Controls, and Events
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.
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Chapter 1 Introduction to Visual Basic.NET Programming In Visual Basic.NET © 2001 by The McGraw-Hill Companies, Inc. All rights reserved.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Chapter 2 –Visual Basic, Controls, and Events
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Getting Started Example ICS2O curriculum
Introduction 01_intro.ppt
Visual Basic Chapter 1 Mr. Wangler.
CS0004: Introduction to Programming Variables – Numbers.
Microsoft Visual Basic 2005: Reloaded Second Edition
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
XP Chapter 7 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Enhancing User Interaction Through Programming Chapter.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
Tutorial 11 Using and Writing Visual Basic for Applications Code
Enhancing User Interaction Through Programming
Using Visual Basic 6.0 to Create Web-Based Database Applications
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
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.
BIM211 – Visual Programming Objects, Collections, and Events 1.
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
Using Visual Basic for Applications (VBA) – Project 8.
Week 1: THE C# LANGUAGE Chapter 1: Variables and Expressions ➤ Included in Visual Studio.NET ➤ What the.NET Framework is and what it contains ➤ How.NET.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 5 Completing the Inventory Application Introducing Programming.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
CC111 Lec7 : Visual Basic 1 Visual Basic(1) Lecture 7.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Applications Development
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
MS Visual Basic 6 Walter Milner. VB 6 0 Introduction –background to VB, A hello World program 1 Core language 1 –Projects, data types, variables, forms,
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
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.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
Chapter 1: Introduction to Computers and Programming.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Introduction to Computer CC111
3.01 Apply Controls Associated With Visual Studio Form
1. Introduction to Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
Microsoft Access Illustrated
An Introduction to Visual Basic
Module 1: Getting Started
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
CIS16 Application Development Programming with Visual Basic
Use of Mathematics using Technology (Maltlab)
Visual Studio.
Presentation transcript:

Introduction 1

CIS 400 Programming for the Windows Environment 2

VB History FORTRAN IBM 1957 BASIC Dartmouth 1964 BASICs Microsoft 1975 MS-DOS 1982 VB 1991 VB 1-6 VBA VB.NET 2001 VB 7-10 VBA 3

Visual Basic is one of four.NET applications (Visual C#, Visual C++, and Visual F#) included in Visual Studio. The main components of the.NET Framework are the Class Library (containing the pre-written code) and Common Language Runtime (which manages the execution of.NET programs)..NET FrameworkClass 4

Visual Basic is an object-oriented, event-driven language 5

Objects Button CheckBox Label and TextBox ListBox 6

Must begin with a letter. Must contain only letters, numbers, and the underscore character (_). Object Naming Punctuation characters and spaces are not allowed. Must be no longer than 40 characters 7

ObjectObject Naming Convention FormfrmfrmFileOpen Check boxchk chkReadOnly Command ButtoncmdcmdExit LabellbllblWind List boxlstlstState Text boxtxttxtLastName Vertical Scroll BarvsbvsbTemp Option (Radio) Button optoptAC Picture BoxpicpicJeep 8

An event is an action performed on an object. Event-driven subroutines are always in the form: object_Event The subroutine “handles” the event that happens to the object. Events 9

ObjectsEvents Click CheckChanged Leave MouseEnter 10

A property is an attribute associated with an object. Using the dot form: object.Property Properties can be assigned during design or run time. Properties 11

PropertiesObjects Text BackColor ReadOnly SelectionMode 12

A method is like a procedure, except that it is tied to an object (control or form), just like a property. In other words, a property is made up of data attached to the object, and a method is a procedure attached to the object. Unfortunately, methods also use the dot form: object.Method Methods 13

There are two ways to tell methods and properties apart. Methods are usually verbs (denoting action) like Hide or Select: frmMain.Hide() Properties are descriptive like ForeColor or Text: lblLetterGrade.Text="A" 14

Furthermore, a method is invoked by simply using the method statement. frmGetFile.Show() Whereas an object property is only part of a statement such as assignment. txtTemp.BackColor = Color.Red 15 For additional predefined colors, see: Color ListColor List and Color TableColor Table

For some methods, you must specify the class from which it is called and the syntax is different. Result = Math.Round( ,2) txtSubtotal.Text = Convert.ToString(subtotal) See pages 119 & 127 in the text for additional Math & Convert class methods. Class.Method(arg(s)) 16

int fff (... ) Local Items. Global Items (variables & constants) int main(). c/c++ execution begins here Preprocessor Directives (includes) 17

VISUALBASICVISUALBASIC FORM(s) Form Level Items Local Items Functions or Procedures MODULE(s) Project or Module Level Items Functions or Procedures Local Items Where does execution begin? 18

APPLICATION PROJECT FORM1.VB FORM2.VB. MODULE1.VB EDITOR APP.EXE COMPILER Syntax Errors DEBUGGER Run-time Errors (Exceptions) Logic Errors EDITOR 19

VB Project Files Solution (.sln) Project (.vbproj) Form (.vb) Plus several others Application (.exe) 20

Let’s begin by looking at a simple interest program written in c++ and Visual Basic. 21

22 #include int main(void) { float principle,rate,time,interest; cout "; cin >> principle; cout "; cin >> rate; cout "; cin >> time; interest = principle * rate * time; cout << "Interest is " << interest; cout << endl; return 0; } c++ Principle --> 1000 Rate --> 5 Time -->3 Interest is What is wrong with this?

23 VB

The full “Professional” version of Visual Studio 2010 has been installed on computers located in Chase 215. You can download a free copy of Visual Basic 2010 Express at: eng#downloads+d-2010-express eng#downloads+d-2010-express 24

VB Environment 25 Let’s design the interface and create the code for the simple interest program

We could: 26 Test for valid textbox contents: Non-empty Only numeric characters We could add: Additional instructions - % A Clear button

Read the Description Of Assigment-1 27