Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-

Slides:



Advertisements
Similar presentations
Working with Intrinsic Controls and ActiveX Controls
Advertisements

An Introduction to Visual Basic Terms & Concepts.
How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 2 More Controls.
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.
Automating Tasks With Macros
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
Introducing More Controls Text boxCheck box Option button Command button frame image.
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.
Flowchart Start Input weight and height
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Input Validation Check the values entered into a text box before beginning any calculations Validation is a form of ‘self-protection’, rejecting bad data.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
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.
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.
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.
Introduction to Visual Basic Chulantha Kulasekere.
Programing App Inventor. Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block – Find the Blocks Editor (top-left),
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
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 Programming Using Visual Basic 6.0
Chapter 2 More Controls Programming in C#. NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Chapter 2 - More Controls More controls – Text boxes - used for user input – Frames - containers to group items – check boxes - user select an option -
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
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.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter Two Creating a First Project in Visual Basic.
Dialog Boxes – Day 1 Built-in Dialog Boxes Input Box Message Box Custom Dialog Boxes – User Forms.
Chapter 2 P. 1 Introducing more controls (on the Toolbox) (Fig. 2.1) - Text box - Frame - Option button - Check box - Image Example P. 44 Figure 2.2 Message.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
CS130 Project 1 A simple VB application ("project" or program): user enters amount of sales then clicks the "Calculate button", the application displays.
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.
Chapter 7 P 1 Lists and Loops List boxes and combo boxes List box - list of items - useful for a list which does not change Combo box - list of items -
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 2 More Controls.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Chapter 7 - Lists, loops and printing w List boxes and combo boxes several types can add items at design time or during run time user select from predefined.
VB Objects & Events (Exercises) School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 3, Friday 1/31/2003)
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
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.
Chapter 2 More Controls Programming in C#. NET Objectives Use text boxes, group boxes, check boxes, radio buttons, and picture boxes effectively.
Slide 1 Controls v Control naming convention –Label: lblName –Command Button: cmdName –Text Box: txtName.
Controlling Program Flow with Decision Structures.
Introduction to Programming Using Visual Basic 6.0 Cheryl Klimack
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
Adding Code to the Option Button. Open VB 1.Double click the Calculate button and select General from the Object list box. 2.Add the following code to.
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
I am using Visual Basic 6 for this class. If you want to use a different version, please contact me. Thanks!
MsgBox, Input Box Functions Check boxes, radio button MsgBox, Input Box Functions Lab 3 3 Ismail M. Romi: PPU- IT Dept.
UFCFY5-30-1Multimedia Studio Scripting for Interactive Media Using Interface Fields to Receive and Display Data to the User.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Topics Graphical User Interfaces Using the tkinter Module
An Introduction to Visual Basic
When I want to execute the subroutine I just give the command Write()
Visual Basic..
and the properties. I named this lblName.
Visual Studio.
Additional Topics in VB.NET
To understand what arrays are and how to use them
Introduction to Visual Basic 2010
CHAPTER FOUR VARIABLES AND CONSTANTS
Presentation transcript:

Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user- interface when the project is running) To display some text in a Text Box during program execution, assign a literal to the Text Property of the Text Box (Does not have a CAPTION Property) txtMessage.Text = “Hello World” Text Boxes

In this example, whatever the user enters into the Text property of the Text Box (txtName) is assigned to the Caption property of the Label (lblName) lblName.Caption = txtName.Text

Frames are used as containers for other controls Groups of Option Buttons or Check Boxes can be placed in frames Using frames to group controls makes the forms easier to understand Set a Frames Caption Property to display the words on the user-interface, on the top edge of the Frame Frames

Allows the user to select or deselect an option In a group of Check Boxes, any number of them may be selected The Value property of a Check Box is set to 0 if unchecked, 1 if checked, or 2 if disabled (greyed) 0 = vbUnchecked 1 = vbChecked Check Boxes

Use only when one Option of a group maybe selected Any Option Buttons placed directly on a Form, function as a Form Group A group of Option Buttons inside a Frame function together as a Frame Group The Value property of an Option Button is set to True if selected, or to False if unselected Option Buttons

Images An Image control holds a picture An Images Picture property can be set to a file with an extension of.BMP,.GIF,.JPG

Writing Windows Apps. with VB The Windows GUI Text boxes Frame Labels Option buttons Check boxes Command buttons Image Picture box

We want to create a program where the height property value of a text box is displayed in the text box, while further printing the contents of the text box onto the form A Practical Example (using Text Boxes)

A variable (X) is declared as an integer Data Type, meaning it can only accept numeric values The Text Box is named BoxContents The Variable X is assigned the value of the Height property of BoxContents (Text Box) The Text property of BoxContents consists of a literal and the value of the variable X The Text in BoxContents is also printed on the form

Before Project Execution During Project Execution

Additional Instructions Make the Text Box blank once the contents have been printed Notify the user that the Text Box is blank Add this Code to the End of the Sub-Procedure BoxContents.Text =“” ‘Empties whatever is in the text box Print “The Text Box (BoxContents) is now blank” ‘Prints this message on the form