ch07 - Microsoft Visual Basic 2008: Reloaded Third Edition...

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

View Full Document Right Arrow Icon
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Seven The For…Next Loop and String Manipulation
Background image of page 1

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

View Full DocumentRight Arrow Icon
Objectives After studying this chapter, you should be able to: Include the For…Next loop in both pseudocode and a flowchart Write a For…Next statement Calculate a periodic payment using the Financial.Pmt method Select the existing text in a text box Code the TextChanged event procedure Microsoft Visual Basic 2008: Reloaded, Third Edition 2
Background image of page 2
Objectives (continued) Include a combo box in an interface Manipulate strings Microsoft Visual Basic 2008: Reloaded, Third Edition 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Microsoft Visual Basic 2008: Reloaded, Third Edition The For. ..Next Statement For. ..Next statement : processes a set of instructions a known number of times Is a pretest loop Counter variable: used to keep track of the number of times the loop has been processed Startvalue , endvalue , and stepvalue items Control the number of times the loop is processed Must evaluate to numeric values Can be positive or negative A negative stepvalue causes the loop counter to count down 4
Background image of page 4
Microsoft Visual Basic 2008: Reloaded, Third Edition 5 Figure 7-1: How to use the For…Next statement
Background image of page 5

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

View Full DocumentRight Arrow Icon
Microsoft Visual Basic 2008: Reloaded, Third Edition The For. ..Next Statement (continued) 6 Figure 7-2: Processing tasks for the For…Next statement
Background image of page 6
Microsoft Visual Basic 2008: Reloaded, Third Edition 7 Figure 7-3: Processing steps for the code shown in Example 1
Background image of page 7

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

View Full DocumentRight Arrow Icon
Microsoft Visual Basic 2008: Reloaded, Third Edition The For. ..Next Statement (continued) Flowchart symbol for the For. ..Next loop is a hexagon Values for the counter variable, startvalue , stepvalue , and endvalue are shown within the hexagon 8
Background image of page 8
Microsoft Visual Basic 2008: Reloaded, Third Edition 9 Figure 7-4: Pseudocode and flowchart for Example 1
Background image of page 9

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

View Full DocumentRight Arrow Icon
Microsoft Visual Basic 2008: Reloaded, Third Edition The Financial.Pmt Method Financial.Pmt method Calculates a periodic payment on a loan or investment Returns the periodic payment as a Double type value Rate and number of periods arguments must be expressed in the same units (monthly, annual, etc.) Also calculates the amount that must be saved each period to accumulate a specific sum 10
Background image of page 10
Microsoft Visual Basic 2008: Reloaded, Third Edition 11 Figure 7-5: How to use the Financial.Pmt method
Background image of page 11

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

View Full DocumentRight Arrow Icon
The Monthly Payment Calculator Application Microsoft Visual Basic 2008: Reloaded, Third Edition 12 Figure 7-5: Sample run of the Monthly Payment Calculator application
Background image of page 12
Microsoft Visual Basic 2008: Reloaded, Third Edition 13 Figure 7-7: Two procedures in the Monthly Payment Calculator application
Background image of page 13

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

View Full DocumentRight Arrow Icon
Microsoft Visual Basic 2008: Reloaded, Third Edition 14 Figure 7-7: Two procedures in the Monthly Payment Calculator application (continued)
Background image of page 14
in a Text Box Windows standard: highlight the existing text when a text box receives the focus SelectAll method : selects all text in a text box Enter
Background image of page 15

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

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

This note was uploaded on 03/05/2010 for the course CIS 2656 taught by Professor Marvpelot during the Winter '08 term at Oakland CC.

Page1 / 64

ch07 - Microsoft Visual Basic 2008: Reloaded Third Edition...

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

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