Chapter 2 Key Terms - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Chapter 2 Key Terms

Description:

In Visual Studio 2005, the ellipse in Image Property box opens the Select ... In Visual Studio 2003, the ellipse in Image Property box opens an Open Dialog box. ... – PowerPoint PPT presentation

Number of Views:99
Avg rating:3.0/5.0
Slides: 29
Provided by: davidlk2
Category:
Tags: chapter | key | terms

less

Transcript and Presenter's Notes

Title: Chapter 2 Key Terms


1
Chapter 2 Key Terms
2
AcceptButton Property
A form property
  • Allows the use of Enter key to work in tandem
    with a button.
  • Avoids mouse manipulation.

The Buttons on the form
3
access key
  • Applies to Buttons
  • Ampersand () to the right of a text letter
    enables key stroke to replace mouse click.

Note the ampersand
Note the underline
does not have to be the first letter of text
4
BorderStyle Property
  • Frames certain visible objects such as the Label,
    TextBox, and PictureBox.
  • Outlines otherwise invisible empty Labels.

5
CancelButton Property
  • Allows the use of Esc key to work in tandem with
    a button.
  • Avoids mouse manipulation.

A form property
The Buttons on the form
6
CheckBox
Text property
  • User may select an option.
  • CheckedChanged event procedure
  • Checked and CheckState properties
  • May have two or three states
  • User may check any number of checkboxes

7
Checked Property of the CheckBox
  • False if CheckBox is unchecked, True if checked.

8
Color constants
  • Color class contains many colors.

9
Component Tray
  • Holds controls that have no visual at run time.

Appears in the document window below the design
form.
10
Concatonation
  • Joining strings of text.
  • Ampersand operator ()
  • Example
  • passwordTextBox.text " is not valid."

space
11
empty string
  • Quotation mark set with no characters between.
    ("")
  • Example
  • nameLabel.Text ""
  • Example results in empty Label.
  • May be used instead of the Clear method.
  • nameLabel.Clear( )

12
Focus
  • Buttons with the focus may be activated with the
    Enter key.
  • TextBoxes with the focus contain an insertion
    point cursor.
  • Focus may be shifted to another control by
    tabbing or by code.
  • Applies only to certain controls
  • Focus changes are actionable events.

13
Focus Method
  • Grabs the focus from another control
  • Example code
  • phoneNumberTextBox.Focus( )
  • Example shifts the focus to the TextBox.
  • Often used when a form is cleared to place the
    insertion cursor in the TextBox needed
    immediately by the user.

14
ForeColor Property
  • The color of text.
  • Example
  • warningLabel.ForeColor Color.Red
  • Example causes the text in the label to be
    colored red.

15
GroupBox
  • Controls placed in a GroupBox can be moved as a
    group at design time or at run time. Within the
    group, relative position is preserved.
  • RadioButtons placed in a GroupBox function
    cooperatively.

16
Image Property
  • Applies to controls that can hold images.

Click on ellipse to browse for images
17
Line Continuation Character
  • space followed by underscore
  • use it to break long lines of code
  • will not break words or identifiers

18
PictureBox Control
  • Specifically for holding an image.
  • For portability, the image file should be copied
    into the .bin folder of the project.
  • See the previous slide titled Image Property

19
RadioButton
  • Use when user may select only one of many.
  • Place cooperative RadioButtons in a GroupBox.
  • CheckedChange is an actionable event
  • Initial state of Checked Property may be set at
    design time.

20
Select Resource Dialog Box
  • In Visual Studio 2005, the ellipse in Image
    Property box opens the Select Resource Dialog
    box.
  • In Visual Studio 2003, the ellipse in Image
    Property box opens an Open Dialog box.

21
Size Mode Property
  • Applies to images.
  • StretchImage makes image fill the PictureBox.

Size Modes
22
StartPosition Property of Form
  • Upper left is default position of the form at run
    time.

Start Position choices
23
Tab Index Property
  • Allows user to use Tab key to move focus in a
    predetermined order.
  • After controls are in place, use ViewgtTab Order
    to set the order.
  • Set TabStop to False to remove a control from the
    Tab order.
  • Applies only to controls that can recieve the
    Focus
  • Tab order must be turned off.

Change TabOrder by clicking on the control
24
TextBox
  • For typed user input.
  • The initial value of the text property may be set
    at design time
  • The text property may be changed by code at run
    time.
  • When in Focus it holds the insertion cursor
  • Entering user text is an actionable event.

25
TextAlign Property
  • Applies to controls that hold text
  • Justifies the text.

26
ToolTip
  • Appears when mouse hovers on control.
  • Provides terse explanation to the user.

Double click on icon in ToolBox to place icon
into component tray. Then edit the ToolTip
property for each control.
27
Visible Property
  • Controls visibility of a control.
  • Set to False to hide a control.
  • Set to True to show a control.
  • May be changed at design time or at run time.

28
With and End With (With block)
  • Use in code when several properties of the same
    object are to be changed at the same time. May
    also include methods.
  • Saves typing. Example
Write a Comment
User Comments (0)
About PowerShow.com