Clearly Visual Basic: Programming with Microsoft Visual Basic 2010, Second Edition Diane Zak instant download
Clearly Visual Basic: Programming with Microsoft Visual Basic 2010, Second Edition Diane Zak instant download
https://ebookmeta.com/product/clearly-visual-basic-programming-
with-microsoft-visual-basic-2010-second-edition-diane-zak/
https://ebookmeta.com/product/visual-basic-in-easy-steps-covers-
visual-basic-2015-fourth-edition-mcgrath/
https://ebookmeta.com/product/starting-out-with-visual-basic-8th-
edition-tony-gaddis/
https://ebookmeta.com/product/oracle-database-programming-with-
visual-basic-net-concepts-designs-and-implementations-1st-
edition-ying-bai/
https://ebookmeta.com/product/the-clover-chapel-2-jamison-
valley-2021st-edition-devney-perry/
Great Ways to Learn Anatomy and Physiology 3rd Edition
Charmaine Mckissock
https://ebookmeta.com/product/great-ways-to-learn-anatomy-and-
physiology-3rd-edition-charmaine-mckissock/
https://ebookmeta.com/product/colombia-9th-edition-jade-bremner-
alex-egerton-tom-masters-kevin-raub/
https://ebookmeta.com/product/the-small-scale-poultry-flock-an-
all-natural-approach-to-raising-and-breeding-chickens-and-other-
fowl-for-home-and-market-growers-2nd-edition-harvey-ussery/
https://ebookmeta.com/product/fortschritte-der-physik-progress-
of-physics-band-29-heft-11-12/
https://ebookmeta.com/product/hybrid-cloud-backup-for-dummies-
veeam-special-edition-brett-mclaughlin/
New Polymer Nanocomposites for Environmental
Remediation 1st Edition Chaudhery Mustansar Hussain
(Editor)
https://ebookmeta.com/product/new-polymer-nanocomposites-for-
environmental-remediation-1st-edition-chaudhery-mustansar-
hussain-editor/
This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may be suppressed.
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience.
The publisher reserves the right to remove content from this title at any time if subsequent rights restrictions require it.
For valuable information on pricing, previous editions, changes to current editions, and alternate formats,
please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for materials in your areas of interest.
CLEARLY VISUAL BASIC®
P R O G R A M M I N G W I T H M I C R O S O F T ® V I S U A L B A S I C ® 2 01 0
This page intentionally left blank
SECOND EDITION
DIANE ZAK
Australia l Brazil l Japan l Korea l Mexico l Singapore l Spain l United Kingdom l United States
Clearly Visual Basic: ª 2012 Course Technology, Cengage Learning
Programming with Microsoft
ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be
Visual Basic 2010, Second Edition reproduced, transmitted, stored or used in any form or by any means graphic, electronic,
Diane Zak or mechanical, including but not limited to photocopying, recording, scanning, digitizing,
taping, Web distribution, information networks, or information storage and retrieval
Executive Editor: Marie Lee
systems, except as permitted under Section 107 or 108 of the 1976 United States
Acquisitions Editor: Brandi Shailer Copyright Act, without the prior written permission of the publisher.
Senior Product Manager: Alyssa Pratt
Freelance Product Manager: Tricia Coia
For product information and technology assistance, contact us at
Associate Product Manager: Cengage Learning Customer & Sales Support, 1-800-354-9706
Stephanie Lorenz
For permission to use material from this text or product,
Marketing Manager: Shanna Shelton
submit all requests online at cengage.com/permissions
Senior Content Project Manager: Jill Braiewa Further permissions questions can be emailed to
Quality Assurance: Green Pen QA permissionrequest@cengage.com
Art Director: Faith Brosnan
Cover Designer: Cabbage Design Company Library of Congress Control Number: 2011921829
Text Designer: Shawn Girsberger
ISBN 13: 978 1 111 53015 0
Print Buyer: Julio Esperas
ISBN 10: 1 111 53015 7
Proofreader: Suzanne Huizenga
Indexer: Alexandra Nickerson Course Technology
Compositor: Integra Software Services 20 Channel Center Street
Boston, MA 02210
USA
Some of the product names and company names used in this book have been used for
identification purposes only and may be trademarks or registered trademarks of their
respective manufacturers and sellers.
Course Technology, a part of Cengage Learning, reserves the right to revise this
publication and make changes from time to time in its content without notice.
Example: Microsoft® is a registered trademark of the Microsoft Corporation.
Cengage Learning is a leading provider of customized learning solutions with office
locations around the globe, including Singapore, the United Kingdom, Australia,
Mexico, Brazil, and Japan. Locate your local office at: www.cengage.com/global
Cengage Learning products are represented in Canada by Nelson Education, Ltd.
To learn more about Course Technology, visit
www.cengage.com/coursetechnology
To learn more about Cengage Learning, visit www.cengage.com
Purchase any of our products at your local college store or at our preferred online store
www.cengagebrain.com
Brief Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
C H AP T E R 1 I Am Not a Control Freak! (Control Structures) . . . . . . . . . .1
C H AP T E R 2 First You Need to Plan the Party (Problem-Solving Process) . . . 11
C H AP T E R 3 I Need a Tour Guide (Introduction to Visual Basic 2010) . . . . . 27
C H AP T E R 4 Do It Yourself Designing (Designing Interfaces) . . . . . . . . . 49
C H AP T E R 5 The Secret Code (Assignment Statements) . . . . . . . . . . . 67
C H AP T E R 6 Where Can I Store This? (Variables and Constants) . . . . . . . 81
C H AP T E R 7 What’s Wrong with It? (Syntax and Logic Errors) . . . . . . . . .101
C H AP T E R 8 Decisions, Decisions, Decisions (Selection Structure) . . . . . .115
C H AP T E R 9 Time to Leave the Nest (Nested Selection Structures) . . . . . .139
C H AP T E R 1 0 So Many Paths . . . So Little Time (Multiple-Alternative
Selection Structures) . . . . . . . . . . . . . . . . . . . .159
C H AP T E R 1 1 Testing, Testing . . . 1, 2, 3 (Selecting Test Data) . . . . . . . .183
C H AP T E R 1 2 How Long Can This Go On? (Pretest Loops) . . . . . . . . . . .203
C H AP T E R 1 3 Do It, Then Ask Permission (Posttest Loops) . . . . . . . . . .231
C H AP T E R 1 4 Let Me Count the Ways (Counter-Controlled Loops) . . . . . . .241
C H AP T E R 1 5 I’m on the Inside; You’re on the Outside (Nested Loops) . . . . .261
C H AP T E R 1 6 I Hear You Are Breaking Up (Sub Procedures) . . . . . . . . . .279
C H AP T E R 1 7 Talk to Me (Function Procedures) . . . . . . . . . . . . . . .303
C H AP T E R 1 8 A Ray of Sunshine (One-Dimensional Arrays) . . . . . . . . . .319
C H AP T E R 1 9 Parallel and Dynamic Universes (More on One-Dimensional
Arrays) . . . . . . . . . . . . . . . . . . . . . . . . . . .341
C H AP T E R 2 0 Table Tennis, Anyone? (Two-Dimensional Arrays) . . . . . . . .363
C H AP T E R 2 1 Building Your Own Structure (Structures) . . . . . . . . . . . .383
vi
CONTENTS
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
42
79.
Great God! what do I see and hear?
The end of things created!
The Judge of mankind doth appear,
On clouds of glory seated.
The trumpet sounds; the graves restore
The dead which they contained before;
Prepare, my soul, to meet him.
43
81.
How shall I meet my Saviour?
How shall I welcome Thee?
What manner of behaviour
Is now required of me?
Let thine illumination
Guide heart and hand aright,
That this my preparation
Be pleasing in thy sight.
44
82.
Before Jehovah’s awful throne,
Ye nations, bow with sacred joy;
Know that the Lord is God alone:
He can create and He destroy.
Repentance is to leave
The sins we loved before;
And show that we in earnest grieve,
By doing so no more.
45
84.
O come, let us sing to the God of salvation!
To Jesus our King who hath brought consolation,
Who in His own body hath opened a fountain
To cleanse our transgressions, tho’ high as a mountain!
46
86.
I sing the almighty power of God,
That made the mountains rise;
That spread the flowing seas abroad,
And built the lofty skies.
47
87.
Hail, Bethlehem! favour’d city, hail!
And hail thou star, with lustre mild,
Whose light, unerring, points the way
Of sages, to the holy Child!
48
W. WALKER AND SONS,
OF THE
Wharfedale Steam-Printing Works,
OTLEY, YORKSHIRE,
ARE PUBLISHERS OF A VERY INTERESTING SERIES OF
Reward Books and Recitations
For Sabbath and other Schools;
RURAL DIALOGUES, FOR CHILDREN;
DIALOGUES ON THE MESSIAH;
Temperance Dialogues & Recitations;
HUMOROUS DIALOGUES,
For Festivals and Anniversaries; and
GEMS OF SACRED MELODY,
In Penny Sheets of Excellent Music.
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,