Chapter08 Slides

Chapter08 Slides - Chapter 08 Tying I t All Together So Far...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Opportunity Click to edit Master subtitle style Chapter 08: Tying It All Together, So Far
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
You will learn how to… Create, code and use RadioButtons, GroupBoxes and CheckBoxes Create, code and use various ListBoxes and ComboBoxes Create, code and use Tabs Create code and use ScrollBars and TrackBars
Background image of page 2
You will learn how to… Create multiple forms, write code to move between them and dispose of them as needed Use various techniques and methods to format and manipulate strings Develop programs that are intuitive and easy to use
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
RadioButtons RadioButton - control, when used with others, allows a user to select one option from the group RadioButtons let a user select one option from a group of options Click on a RadioButton to select it Selecting another RadioButton deselects the one already selected Only one can be selected at a time
Background image of page 4
RadioButtons in Group Boxes Use them when only one item in a list be can selected Group RadioButtons in a GroupBox Puts controls together and lets them act in unison GroupBox - A control used to organize other controls, usually RadioButtons and CheckBoxes GroupBoxes are a necessity when two or more sets of RadioButtons are on the same form
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Pizza Orders Customer must select a size and a crust to place an order Use grp as the GroupBox prefix Use rad as the RadioBubtton prefix Format menu is handy for aligning and spacing Use the Text property to describe them
Background image of page 6
Group Box in Design View Containers Section grpSize grpStyle radSmall
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Checked Property Checked property determines if a RadioButton is selected Set the Checked property to True to have it automatically selected at runtime radMedium.Checked = True
Background image of page 8
Reading the Checked Property Use an If statement to check to see if it’s been selected If radMedium.Checked = True Then strSize = "Medium" decPrice = 10.95 End If
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CheckedChanged Event Code can be placed in the RadioButton as well CheckedChanged event is triggered when the user selects a RadioButton Double click on a RadioButton to create a CheckedChanged event Private Sub radMedium_CheckedChanged(. .. mstrSize = "Medium" mdecPrice = 10.95 End Sub
Background image of page 10
T-Shirts Program VB students decide to order T-shirts for class Students select the size they want and click the order Button CheckedChanged event in each RadioButton sets the size and price of the t-shirt Size stored in mstrSize and price is in mdecPrice Order Button displays the size and price
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
T-Shirts Order Form
Background image of page 12
T-Shirt Code Public Class frmVBMasterTShirts Dim mstrSize As String Dim mdecPrice As Decimal Private Sub radSmall_CheckedChanged(. .. mstrSize = "Small" mdecPrice = 8 End Sub Private Sub radMedium_CheckedChanged(. ..
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 71

Chapter08 Slides - Chapter 08 Tying I t All Together So Far...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online