Introduction to VB6 Week 1 3/2/2004 PPCC - Introduction to VB6

Slides:



Advertisements
Similar presentations
Creating a Dialog-Based Comet Windows Program Brian Levantine.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Using VB with MS Applications R. Juhl, Delta College.
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
Using Macros and Visual Basic for Applications (VBA) with Excel
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
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.
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
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)
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
1/26/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup 1 Introduction to VB6 Materials & Prerequisites Course Outline Background Information.
DT265-2 Object Oriented Software Development 2 Lecture 3 : Windows Programming Lecturer Pat Browne
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
Microsoft Visual Basic 2012 CHAPTER TWELVE (ENRICHMENT CHAPTER) Windows Store Apps.
3/9/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup 1 Introduction to VB6 Week 2.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich Phone: YangQ 1.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
CS 2340 Programming in VB.NET Instructor: Dr. Qi Yang Office: 213 Ullrich Phone: YangQ 1.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
An Introduction to Visual Basic
IE 411/511: Visual Programming for Industrial Applications
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
Appendices A - F A-F Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction It is developed to create software applications. It is a tool for developers of any program that uses both basic and expert settings. It.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
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 Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
1 Visual Basic Part I - A tool for customizing your program Principles of GIS
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Visual Basic Integrated Development Environment (IDE) 56:150 Information System Design.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Dive Into® Visual Basic 2010 Express
Visual Basic Fundamental Concepts
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 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
1. Introduction to Visual Basic
Visual programming Chapter 1: Introduction
3.01 Apply Controls Associated With Visual Studio Form
Using Procedures and Exception Handling
VB 6.0.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich
VISUAL BASIC.
Visual Basic..
Chapter 2 – Introduction to the Visual Studio .NET IDE
Understanding the Visual IDE
CIS16 Application Development Programming with Visual Basic
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Presentation transcript:

Introduction to VB6 Week 1 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup PPCC - Introduction to VB6

Materials & Prerequisites Software: Visual Basic 6.0 A Working Model in included with the book Course will target the VB 6 Professional Edition Check with MS for free 90 day trial edition Participant CD VB 6 Service Pack 5 http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspx Microsoft Jet 4.0 Service Pack 8 http://www.microsoft.com/downloads/results.aspx?productID=3D99F106-AA6D-4113-AE45-30B61394B1E0&freetext=&DisplayLang=en Get the one that matches your system!!! Microsoft Data Access Components (MDAC) downloads can be found from: http://msdn.microsoft.com/data/downloads/updates/default.aspx Microsoft Data Access Components (MDAC) 2.7 SP1 Refresh http://www.microsoft.com/downloads/details.aspx?familyid=9ad000f2-cae7-493d-b0f3-ae36c570ade8&languageid=f49e8428-7071-4979-8a67-3cffcb0c2524&displaylang=en MDAC Buffer Overrun Secrity Patch MS04-003 http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/Bulletin/MS04-003.asp 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup PPCC - Introduction to VB6

Course Outline, Week 1 Getting Started with VB6 Installation & Setup of VB6 for development Launching VB6 VB6 Settings The VB6 IDE 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup PPCC - Introduction to VB6

Course Outline, Week 1 Your first app (Hello World) Running the application Calculating an approximation of PI Very simple – use 22/7, but use controls for input/output Designing a user interface 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup PPCC - Introduction to VB6

Course Outline , Week 1 Adding code to your application Visual Basic Statements Simple Variable and Constant Declarations Assignment Statements and Expressions If … Then … Else … End If Accessing controls on the form Control Properties, Methods, and Events Simple controls: TextBox, Label, CommandButton, Timer ListBox and ComboBox File, Directory, and Drive – example of control interaction 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup PPCC - Introduction to VB6

The Parts of VB6 The Integrated Development Environment This is the VB6 editor/form designer/compiler Visual Studio 6.0 Tools Most of these are for advanced users Sample Projects On-Line Help = MSDN Library See differences between VB6 Editions: http://msdn.microsoft.com/vbasic/previous/vb6/datasheet/feature.aspx 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

Launching VB6 You will find Microsoft Visual Basic 6.0 on your Start > Programs menu "First Choice": New | Existing | Recent See the different choices under each: New Create a new project allows selection of new project from Templates and Wizards Existing Browse for existing VB project files Recent The most recent projects opened in VB6 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options Standard EXE Typically used for standard applications Loads with the intrinsic VB6 controls in the toolbox Loads a new project with a single form 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options ActiveX EXE or ActiveX DLL Used to create objects used by (other) applications No forms included, creates a single Class module 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options ActiveX Control Allows developing your own controls (that can be used on forms in other applications) Loads with the intrinsic VB6 controls in the toolbox Loads a new project with a single form-like UserControl module 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options VB Application Wizard Addin Based on user selections, VB creates a skeleton application ready for entering code to handle menu and button events, etc. Addin Creates a project that runs as an add-in under the VB6 IDE 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options Data Project Creates a new project that contains a single Form, a DataEnvironment object and a DataReport object This project includes a number of references to support Data Access and Data Binding It also includes several additional controls in the toolbar 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

New Project Options Customization You can add your own project templates and form templates, etc. C:\Program Files\Microsoft Visual Basic\VB98\Template\… If you don’t want the initial dialog to show when you launch VB6, check "Don’t show this dialog in the future". 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

VB 6 Settings 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

VB 6 Settings 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

VB 6 Settings 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

VB 6 Settings 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The VB6 IDE 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The VB6 IDE 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The VB6 IDE The Forms Designer The Toolbox window contains the controls available for use Double click an icon in the Toolbox or Click an icon in the Toolbox and click and drag the sizing handles on the form Release the mouse button Resize control by selecting and click & drag sizing handles 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The VB6 IDE The VB6 Menu and Toolbar Selection Coordinates Left, Top Width, Height Run, Pause, Stop Application debugging Opens the different windows Examples of custom toolbars Add project, Add "module", Menu editor 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The VB6 IDE The VB6 Menu and Toolbar Bookmark buttons Indent/Unindent selected block of code Breakpoint Toggle Comment/Uncomment selected block of code Intellisense helpers Intellisense usually kicks in automatically Buttons are not too frequently used 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

The First App – Hello World Open VB6 Create a New Standard EXE project Double-click the form Enter the following code in Sub Form_Load() MsgBox "Hello World" Press F5 or click the  button 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

Hello World Variations Using constants and expressions Sub Form_Load() Const WORLD = "World" MsgBox "Hello " & WORLD End Sub 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

Hello World Variations Using Controls and Variables Place a CommandButton on the form Add a Label, TextBox, and another Label to the form Make the Caption for the first label "Name" Double-click the Button Enter the following code in Sub CommandButton1_Click(): Dim sHello as String sHello = "Hello " & Text1.Text Label2.Caption = sHello Press F5 to run, enter a name and click the button 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup

Hello World Variations This is what your form and code should look like: 3/2/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup