Working with Forms in Visual Basic

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Tutorial 31 Variable Memory location whose value can change as the program is running. Used to hold temporary information Used to control the type of data.
VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
Chapter 3: Using Variables and Constants
Chapter 3: Using Variables and Constants Programming with Microsoft Visual Basic 2005, Third Edition.
Lecture Set 4 Data Types and Variables Part B – Variables, Constants, Expressions Conversion Rules Options Strict, Option Explicit Scope of Definition.
Using Visual Basic 6.0 to Create Web-Based Database Applications
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.
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
Multiple Forms & Procedures. Form Methods: –Show, Hide, Activate, Close Events: –Load, Activated, Closing, Closed.
Scope of Variables and Constants A Variable or Constant may exist and be Visible for an entire project, for only one form, or for only one procedure Therefore,
1 Pertemuan 03 Representing Data Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
Scope of Variables and Constants A Variable or Constant may exist and be Visible for an entire project, for only one form, or for only one procedure Therefore,
Chapter Three Using Variables and Constants Programming with Microsoft Visual Basic th Edition.
Chapter 3: Using Variables and Constants
Programming with Microsoft Visual Basic th Edition CHAPTER THREE USING VARIABLES AND CONSTANTS.
Tutorial 11 Using and Writing Visual Basic for Applications Code
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 6 Multiple Forms.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Why to Create a Procedure
Learning about Expert Systems through computer programming.
CHAPTER THREE Representing Data: Constants and Variables.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Microsoft Visual Basic 2005 CHAPTER 4 Variables and Arithmetic Operations.
Fundamentals of GUI Programming. Objectives: At the end of the session, you should be able to: describe the guidelines that are used for creating user-friendly.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
UnitII Visual basic Controls and toolbars. What is visual basic Visual Basic (VB) is an ideal programming language for developing sophisticated professional.
Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory locations identifier, data type, scope data types - values.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter Three Using Variables and Constants.
Programming with Microsoft Visual Basic th Edition
Tutorial 3: Using Variables and Constants1 Tutorial 3 Using Variables and Constants.
Variables Hold information that may be manipulated, used to manipulate other information or remembered for later use A storage location in memory (RAM)
Variables in VB.NET. Variables  A storage location in memory (RAM)  Holds data/information while the program is running  These storage locations can.
Copyright © Don Kussee 1120-Ch3 #481 CNS 1120 Chapter 3 Data Types and Variables 1120-Ch3.PPT.
CHAPTER THREE Representing Data: Constants and Variables.
Week 1 Lecture 1 Slide 1 CP2028 Visual Basic Programming 2 “The VB Team” Copyright © University of Wolverhampton CP2028 Visual Basic Programming 2 v Week.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are used in programs so that values can be represented with.
Programming with Microsoft Visual Basic 2012 Chapter 3: Using Variables and Constants.
Sub Procedures Chapter 6-Part 1. Chapter 6 Part 12 Event Procedures Code that occurs based upon event. Mouse click Got focus Repetitive code that might.
Chapter 8 Multiple Forms, Modules, and Menus. Introduction This chapter demonstrates how to: – Add multiple forms to a project – Create a module to hold.
Representing Data: Constants and Variables
XHTML Forms.
Multiple Forms and Menus
Visual Basic Fundamental Concepts
Programming Right from the Start with Visual Basic .NET 1/e
VISUAL BASIC 6.0 Designed by Mrinal Kanti Nath.
Egyptian Language School Computer Department
A variable is a name for a value stored in memory.
Visual Basic 6 (VB6) Data Types, And Operators
Chapter 3: Using Variables and Constants
2. Understanding VB Variables
Microsoft Office Illustrated
Understand Variables and Naming Conventions
Variables and Arithmetic Operations
Microsoft Visual Basic 2005 BASICS
Visual Basic..
Chapter 6 Multiform Projects
CIS16 Application Development Programming with Visual Basic
Unit-1 Introduction to Java
Visual Basic Programming Chapter Four Notes Working with Variables, Constants, Data Types, and Expressions GROUPBOX CONTROL The _____________________________________.
Intro to Programming Concepts
Introduction to Programming
3.2 Working with Data Scope of variables 29/07/2019.
Değişkenler Variables can temporarily store the value of data in memory during the execution of your program. They are often referred to as containers.
Presentation transcript:

Working with Forms in Visual Basic

The main characteristic of a Form is the title bar

CONTROL MENU Restore : Restores a maximized Form to the size it was before it was maximized; available only if the Form has been maximized. Move : Lets the user moves the Form around with the mouse Size : Lets the user resizes the control with the mouse Minimize: Minimizes the Form Maximize : Maximizes the Form Close : Closes the Form

Loading and Unloading Forms Load and Unload statements in VB Load FormName Unload FormName

Showing and Hiding Forms Show method is used to Show a Form FormName.Show The Hide method is used to hide a Form Me.Hide Me is the form name, Keyword

OBJECT PROPERTY SETTING Form Caption Name Form1 frm1 Form2 frm2 Form3 frm3 Label Click on a button to display a Form Label1

Variables

Variables Variables are the memory locations which are used to store values temporarily. Rules A variable name must begin with an alphabet letter and should not exceed 255 characters. It must be unique within the same scope. It should not contain any special character like %, &, !, #, @ or $.

Syntax Dim variable [As Type] Dim I as integer Dim intInterestRate As Integer = 10

Scope of variables A variable is scoped to procedure-level (local) -Global module-level – Local They can be declared with Dim and Static keywords.

Local Variables A local variable is one that is declared inside a procedure. Dim sum As Integer The local variables exist as long as the procedure in which they are declared, is executing.

Static Variables A static variable is declared as given below. Static intPermanent As Integer Variables have a lifetime in addition to scope.

DATATYPES Numeric Data Types Non-numeric Data Types Suffixes for Literals