0% found this document useful (0 votes)
149 views14 pages

Visual Basics Lesson 5: Labels

LABELS Labels hold the primary text that appears on a form. Often, programmers use labels to place titles in forms and to label text boxes so that users know what to type into the text box. Common labels properties Elements of a Visual Basic interface The Code Window Elements of Code Window
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views14 pages

Visual Basics Lesson 5: Labels

LABELS Labels hold the primary text that appears on a form. Often, programmers use labels to place titles in forms and to label text boxes so that users know what to type into the text box. Common labels properties Elements of a Visual Basic interface The Code Window Elements of Code Window
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

LABEL

S
Visual Basic: Lesson 5

Prepared by:
A.A. Gonzaga
Labels
Labels hold the primary text that
appears on a form. Often, programmers
use labels to place titles in forms and
to label text boxes so that users know
what to type into the text box.
Common labels
properties
Property Description
Alignment Determines whether the label’s caption appears left-
justified, centered, or right-justified within the label’s
boundaries.
AutoSize Enlarges the label’s size properties, when True, if you
assign a caption that is too large to fit in the current
label’s boundaries at runtime.
BackColor Specifies the label’s background color. Click the
BackColor palette’s down arrow to see a list of colors
and click System to see a list of common Windows
control colors.
Property Description
BackStyle Determines whether the background shows
through the label or if the label covers up its
background text, graphics, and color.
BorderStyle Determines whether a single-line border
appears around the label.
Caption Holds the text that appears on the label.
Enabled Determines whether the label is active. Often,
you’ll change the Enabled property at runtime
with code when a label is no longer needed.
Font Produces a font dialog box in which you can
set the caption’s font name, style, and size.
Property Description
ForeColor Holds the color of the label’s text.
Height Holds the height of the label’s outline in twips.
Left Holds the numbers of twips from the label’s
left edge to the Form window’s left edge.
MousePoin Determines the shape of the mouse cursor
ter when the user moves the mouse over to the
label.
TabIndex Specifies the order of the label in the focus
order. Although labels cannot receive focus,
they can be part of the focus order.
Property Description
ToolTipText Holds the text that shows as a ToolTip at
runtime.

Top Holds the number of twips from the label’s top


edge to the Form window’s top edge.

Visible Determines whether the label appears or is


hidden from the user.

Width Holds the width of the label in twips.

WordWrap Determines whether the label expands to fit


whatever text appears in the captions.
Labels
Labels can present problems if they
receive text that is too large for the
label boundaries. By using certain
property combinations, you can add
automatically adjusting labels for
whatever text the labels need to hold.
Elements of a Visual
Basic interface
1.  Toolbar- provides quick access to the generally used
commands in the programming environment.
2. Menu Bar- display the commands you used to build
your application.
3. Form- it serves as a window that customizes the
interface of your applications. The control graphics,
and pictures are added to create the look you want. It
already has the system menu bar, a title bar both
minimize boxes, in window client area
Elements of a Visual
Basic interface
4. Toolbox- are all graphical object you can design
and place on a form as list boxes, buttons, labels,
and so on.
5. Properties Window- lists the property setting for
the selected form or control.
– Object Box- display the name of the object for which
you can set properties.
– Setting Box- allows you to edit the setting for the
property selected in the properties list.
Elements of a Visual
Basic interface
6. Project Window- list the form, code modules and
control files that compose the current project. It is
useful when you have multiple forms or code.
7. Project container window- it holds the source codes
and the interface or the project.
8. Form layout window- its purpose is to give you a
thumbnail view the current form showing you what
it looks like and how it is positioned on the screen at
run time.
The Code
Window
The Code Window
The code window allows you to write,
display, and edit Visual Basic source
code or your program.
Elements of Code Window
• Object Box- displays the name of the selected object such
as command, label, form, text box, combo box, frame, etc.
• Procedure Box- list all events recognized by Visual Basic
for the form and control displayed in the object box.
• Source Code- Visual Basic statements that are written in
the code window.

You might also like