Slide 1 Forms v Parts of a form v Form: Program User Interface v Controls are contained inside forms v Control event handlers are contained inside forms.

Slides:



Advertisements
Similar presentations
Working with Intrinsic Controls and ActiveX Controls
Advertisements

VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Chapter 1: An Introduction to Visual Basic 2012
Chapter 2 –Visual Basic, Controls, and Events
Excel and VBA Creating an Excel Application
Using Visual Basic 6.0 to Create Web-Based Database Applications
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.
Visual Basic Project 1 IDS 306 Spring 1999 V. Murphy.
CVEV 118/698 Visual Basic Lecture 3 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab2 Managing Controls.
Chapter 31 Visual Basic Controls A Form is a windows-style screen displayed by Visual Basic programs. In a form, a programmer can create objects in a form.
Introduction to Visual Basic Chulantha Kulasekere.
Chapter 2 –Visual Basic, Controls, and Events
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Visual Basic Chapter 1 Mr. Wangler.
Introduction to Visual Basic (VB)
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 6 Multiple Forms.
Multiple Forms, Standard Modules, And Menus
Multiple Forms and Standard Modules
Chapter 6 Understanding the Structure of an Application: Procedures, Modules, and Classes.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
Week 2: WINDOWS PROGRAMMING Chapter 15 in “Beginning Visual C# 2010” ebook Chapter 4 in “”MCTS_Self-Paced_Training_Kit” ebook.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
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.
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.
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.9 to  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
1 Visual Basic Part I - A tool for customizing your program Principles of GIS
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
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.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
More Visual Basic Code: if-then-else, for loops Controls: Multiple forms, List Boxes, Radio buttons, frames,
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Chapter 2 - VB 2008 by Schneider1 Chapter 2 –Visual Basic, Controls, and Events 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
2-1 Chapter 2 Using VB.NET to Create a First Solution.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Programming with Microsoft Visual Basic 2012 Chapter 1: An Introduction to Visual Basic 2012.
Chapter 8 Multiple Forms, Modules, and Menus. Introduction This chapter demonstrates how to: – Add multiple forms to a project – Create a module to hold.
Visual Basic .NET BASICS
Visual Basic.NET Windows Programming
Microsoft Visual Basic 2005 BASICS
Chapter 2 – Introduction to the Visual Studio .NET IDE
An Introduction to Computers and Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Working with Forms in Visual Basic
An Introduction to Computers and Visual Basic
Chapter 2 Visual Basic Interface
Windows xp PART 1 DR.WAFAA SHRIEF.
Hello World in Visual Basic
Visual Basic: Week 5 Review User defined functions
An Introduction to Computers and Visual Basic
Understanding the Integrated Development Environment
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Week 2: WINDOWS PROGRAMMING
Presentation transcript:

Slide 1 Forms v Parts of a form v Form: Program User Interface v Controls are contained inside forms v Control event handlers are contained inside forms Close button Minimize button Maximize buttonControl Box Caption Design grid

Slide 2 Controls & Properties v Control: is an object designed to perform a specific task v Properties: are used to easily customize an object appearance v Properties of a form are saved in “.FRM” files v Form graphics and other binary elements are saved in “.FRX” files v Common properties: –Name –Index –Left –Top –Height –Width –Enabled –Visible

Slide 3 Controls & Properties v Object Position –Left: Horizontal distance from the left of the form –Top: Vertical distance from the top of the form v Changing properties can be at Design time and/or at Run time –Design time: through properties window –Run time: through programming

Slide 4 Measurements & Auto List v Measurements in VB: –Twips: device – independent unit measure = 1/20 of a printer point –1440 Twips = 1 inch v Auto List: When an object name is typed followed by a dot, VB lists all properties and events (select one using (Ctrl+Enter)

Slide 5 Referencing Controls & Forms v Name property: is a unique identifier by which an object can be referenced in program code. v VB Object type & Common Name Prefix: –CheckBox: chk –ComboBox: cbo –Command Button: cmd –Form: frm –ListBox: lst –Menu: mnu u For a complete list, See page 49

Slide 6 Methods v Methods are: –tasks that controls can perform –Program functions built into bojects –E.g. “.PrintForm” v Common Methods: –Drag –Move –SetFocus –Zorder

Slide 7 Events v Events are triggers that are raised by user, e.g. Click on a command button v To respond to an event a code is written (Event procedure) v Some property changes can trigger events (e.g. changing height or Width property of a form triggers the Resize event)

Slide 8 Displaying a Form v Single form (by default it is the StartUp form) v Select StartUp form from the project menu v Loading a form: –Load frmApplication (loading a form into memory) –Show frmApplication (Loading/Displaying a form) u Modal option: control is only for that form until closed –frmApplication.Show vbModal u Modeless option: control can be given to any part of the program

Slide 9 Unloading a Form v Hiding a form: –frmApplication.Hide (Not removed from the memory) –Unload frmApplication (removes it from the memory) –Unload Me (Me refers to the current object)

Slide 10 If...Then...Else Statement v If condition Then statements [Else elsestatements ] Or, you can use the block form syntax: v If condition Then [statements] [ElseIf condition-n Then [elseifstatements]]... [Else [elsestatements]] End If