Working with User Input - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Working with User Input

Description:

Selecting the class and method names from the listboxes at the top of the code window ... Click on the Add ToolStrip button to select tools to add from the pop up menu ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 15
Provided by: busi186
Category:
Tags: input | popup | user | working

less

Transcript and Presenter's Notes

Title: Working with User Input


1
Working with User Input
  • Business 92
  • Spring 2008
  • Roldan

2
Scheduling Notes
  • Midterm review next week
  • Midterm in 2 weeks (March 18)
  • Save the Date MIS ExperienceFriday, April 18
    3pm to 6pm

3
Event Procedures
  • Create event Procedures by
  • Double-clicking on the relevant control
  • Selecting the class and method names from the
    listboxes at the top of the code window
  • Type in the relevant code or use code-snippets to
    start

Method
Control/Class
4
Working with other types of events
  • The Form_Load event is a good event to associate
    with the baseline look of your form
  • Code anatomy
  • Button1.Enabled False
  • Label1.Hide()

5
Combining events data retrieval in one form
6
Retrieving Data from Controls
  • A new event Button1_MouseHover
  • See page 136 for a table of Controls store
    control information, the property that you use to
    access the information and the type of data
    stored
  • Conditional Statements like IfThen.Elseif.End
    help you use the informations to control how your
    application behaves
  • Code Anatomy
  • If CheckBox1.Checked And Not CheckBox2.Checked
    Then
  • Label1.Text TextBox1.Text
  • ElseIf CheckBox2.Checked Then
  • Label1.Text "Please click Here"
  • ElseIf CheckBox1.Checked And CheckBox2.Checked
    Then
  • Label1.Text "Please click Here"
  • End If
  • Label1.Show()

7
Nice to have
  • New event Button1_MouseLeave
  • Code Anatomy Label1.Hide()

No Label whenmouse is not hovering over Button 1
8
Complete Code
9
Pull-Down Menus
  • Use the Menustrip control in the Menus Toolbars
    category of the toolbar to add a menu to your
    application
  • Type menu items in the areas marked Type Here
  • Double-click on a menu item to associate code
    with it

10
Toolstrips
  • Use the ToolStrip control located in the Menus
    Toolbars category of the Toolbox
  • Click on the Add ToolStrip button to select tools
    to add from the pop up menu
  • Double-click on a toolstrip tool to associate
    code with it

11
List Boxes
  • Listboxes allow users to select from a list of
    options
  • Use the selection mode to control how many items
    a user can select at one time
  • One allows only one item to be selected
  • Multisimple allows several items to be selected
    at once
  • Multiextended allows several items to be selected
    at once and activates the arrow, Ctrl and Shift
    keys to aid users with selections

12
Code Anatomy
13
LinkLabels
LabelControl
LinkLabelControl
14
In Class Work
  • Complete the survey found at http//www.zoomerang
    .com/survey.zgi?pWEB227GZHQKQ2T
  • Do the tutorials on pages 133, 136, 151, 157,
    166, and 181
  • Add the following to your application
  • A pull down menu or toolstrip
  • Code for an event other than a button-click
  • A procedure that uses data retrieved from a
    control
  • Important! Build the executable for your
    application and tutorials and place them in a
    folder named mar4
Write a Comment
User Comments (0)
About PowerShow.com