Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Using Macros and Visual Basic for Applications (VBA) with Excel
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
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.
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?) The.
Chapter 1: An Introduction to Visual Basic.NET Programming with Microsoft Visual Basic.NET, Second Edition.
The Initial Visual Basic Screen
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
Introduction to computers & Visual Basic School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 3, Monday 1/27/2003)
VB Controls and Events Week 7: Picture Box, Image Box, Option, Check box, Mouse over, Frames, Shapes.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 بسم الله الرحمن الرحيم Palestine Polytechnic University College of Administrative science and.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
Visual Basic.net IDE. Integrated Development Environment.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Controls General Discussion. VB Controls Visual Basic Controls A control is the generic name for any object placed on a form Controls may be images,
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Visual Basic Chapter 1 Mr. Wangler.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
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.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., Visual Basic Projects Project Structure and VB’s Programming Tools chapter TWO.
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.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
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 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.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
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.
Integrated Development Environment Visual Basic IDE Slide 2 of 10 Topic & Structure of the lesson Introduction Integrated Development Environment Tool.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
1 Visual Basic Part I - A tool for customizing your program Principles of GIS
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
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.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
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.
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.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1: An Introduction to Visual Basic .NET
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Visual Basic Code & No.: CS 218
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
VB 6.0.
Visual Basic.
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
Визуалды бағдарламалау ортасы.
P.J.Balakumaran, AP, Commerce CA, SNMV CAS
Visual Studio.
Presentation transcript:

Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information about the VB environment (release 2.0 and 3.0 of VB,.MAK extensions for project files).FRM file: Form File: each form in the project is saved in a.FRM extension. Each form file holds a description of all Objects and their Properties for the form, as well as the Basic Code written (In VB each of these Form Files is referred to as a Form Module)

.BAS file: Standard Code Modules: hold VB ‘Basic’ statements that can be accessed from any Form.BAS files are used in multiform projects.OCX file: Custom Controls: additional controls/custom controls are stored in.OCX files. If projects include controls that are not part of the Standard Control Set, then.OCX file names will be included in the project (All controls have.OCX extensions, however, this is implicit in controls internal to the VB Environment, and these extensions are not visible to the user).VBW file: after the project is saved, VB automatically adds one more file to the project, which holds information about each of the project Forms

Project Tip Create a New Folder for a project, before creating any files for the project Save the.VBP file Save the.FRM files, and Save the.BAS files into the folder Then if the project needs to be copied or transferred from the ‘C: Drive’ to the ‘A: Drive’, all of the project files can be transferred together within the folder, and no component parts (.VBP,.FRM,.OCX[if existing])of the project will be lost Component parts of a project can be lost and always save each component part separately

The VB Environment VB Environment, where projects are created The various windows, in the VB Environment, can be moved, resized, opened, and closed The windows within a project can be customised

FORM TOOLBOX FORM WINDOW TOOLBAR MENU BAR PROJECT EXPLORER WINDOW FORM LOCATION & SIZE INFORMATION PROPERTIES WINDOW PROPERTIES HELP PANE FORM LAYOUT WINDOW FORM1: NAME OF THE OBJECT FORM: CLASS OF THE OBJECT

POINTER (NOT A CONTROL) LABEL FRAME DRIVELISTBOX FILELISTBOX LINE DATACONTROL CHECKBOX COMBOBOX HSCROLLBAR TIMER DIRLISTBOX SHAPE IMAGE OLE PICTUREBOX TEXTBOX COMMAND BUTTON OPTIONBUTTON LISTBOX VSCROLLBAR

The Form Window is where the forms are designed that make up the User-Interface Always create a ‘User-Friendly’ User-Interface Standard windows techniques can be used to change the size and location of the form ‘Mouse-Driven Environment’ By default, a new form created in a new project, is called Form1, when the file is saved, the programmer assigns a more meaningful name to the file (?: What is the extension?)

The Project Explorer Window holds the filenames of the files included in the project The windows Title Bar holds the name of the project, which is Project1 by default, until saved and given a more meaningful name (?: What is the extension?)

The Properties Window, its use relates to setting the properties for the objects in the project Check Box 1/0, True/False Option Box 1/0, True/False Command Button ‘Name’ how the computer recognises/identifies the control/object ‘Caption’ relates to the user identification of the control/object Text Box ‘Text’ property: ‘Blank’ ‘Name’ property: like command button Form Window State ‘Maximise’, relates to maximising the form when the project is executed

The Form Layout Window, this indicates the position of the form on the desktop, when the execution of the project begins The Toolbox holds the tools that are used to place controls on the form The tools displayed on the toolbox, may be different, depending on the edition and release of VB being used ‘Professional Edition’

The Main Visual Basic Window holds the VB menu bar, the toolbar, and the form location and size information The Toolbar, the buttons on the toolbar can be used as shortcuts for frequently used operations Each button represents a command that can be executed by clicking on the button or by choosing a command from the menu bar The Form Location and Size Information identifies the size and position of the form on the screen

Help VB has an extensive ‘Help’ facility VB contains what is called ‘Context-Sensitive’ help

Design Time, Run Time, Break Time VB has 3 distinct modes: Design Time: relates to designing the ‘User- Interface’ and writing code Run Time: relates to testing and running the project Break Time: if there is a ‘run-time error’ or project execution is paused

VB Project Example The first ‘Event-Driven’ project will create a form with 3 controls It will display the message ‘Hello world’ when the user clicks the ‘Push Me’ command button, and will terminate when the user clicks the ‘Exit’ command button (Tip: If the Project Explorer Window/Properties Window/Toolbox are not displayed, open the View menu and select Project Explorer Window/Properties Window/ Toolbox

Project Tips Do not confuse the ‘Name’ and ‘Caption’ properties ‘Name’ refers to the control in the VB code ‘Caption’ refers to the users view on the form VB sets both of these properties to the same value by default, and therefore it is easy to confuse them NB: Always set the ‘Name’ property of controls before writing code If the ‘Name’ of an object is changed after the code has been written, then the code becomes separated from the object and the program does not run properly

When a VB project is running, the user can do many things Each action by the user causes an ‘Event’ to occur in the VB project If you write VB code for a particular event, the VB will respond to the event and automatically execute your procedure (eg: clicking on a command button) VB ignores events for which no procedures are written (eg: moving the mouse resizing a window opening another application)

VB code written in procedures We deal with writing code in ‘Sub Procedures’ or ‘Sub Programs’ Begins with: Private Sub Ends with: End Sub

VB automatically names the event proceudres The ‘Name’ consists of the object name, an underscore ( _ ), and the name of the event (name of the command button is cmdPush and there is a Click event for the command button Therefore, the name of the Sub Procedure: cmdPush_Click