Tải bản đầy đủ (.pdf) (7 trang)

a0007 wrox microsoft visualbasic 2010 step by ste morebook vn 2021

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.19 MB, 7 trang )


PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2010 by Michael Halvorson
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means
without the written permission of the publisher.
Library of Congress Control Number: 2010924441
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWT 5 4 3 2 1 0
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information about
international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly
at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to
Microsoft, Microsoft Press, Access, ActiveX, Arc, Azure, DataTips, Excel, Expression, Halo, IntelliSense, Internet Explorer,
MS, MSDN, MS-DOS, PowerPoint, SharePoint, Silverlight, SQL Server, Visual Basic, Visual C#, Visual C++, Visual
InterDev, Visual Studio, Windows, Windows Azure, Windows Server, Windows Vista and Zoo Tycoon are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company
names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted
herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo,
person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without any
express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will
be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Acquisitions Editor: Ben Ryan
Developmental Editor: Devon Musgrave
Project Editor: Valerie Woolley


Editorial Production: Christian Holdener, S4Carlisle Publishing Services
Technical Reviewer: Technical Review services provided by Content Master, a member of CM Group, Ltd.
Cover: Tom Draper Design
Body Part No. X16-88509


For Henry



Contents at a Glance
Part I






1 Exploring the Visual Studio Integrated Development
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Writing Your First Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3 Working with Toolbox Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4 Working with Menus, Toolbars, and Dialog Boxes . . . . . . . . . . . . 97

Part II












Getting Started with Microsoft Visual Basic 2010

Programming Fundamentals

5 Visual Basic Variables and Formulas,
and the .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6 Using Decision Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
7 Using Loops and Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
8 Debugging Visual Basic Programs . . . . . . . . . . . . . . . . . . . . . . . . 209
9 Trapping Errors by Using Structured Error Handling . . . . . . . . . 227
10 Creating Modules and Procedures . . . . . . . . . . . . . . . . . . . . . . . . 247
11 Using Arrays to Manage Numeric and String Data . . . . . . . . . . . 273
12 Working with Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
13 Exploring Text Files and String Processing . . . . . . . . . . . . . . . . . . 313

Part III Designing






14
15

16
17

the User Interface

Managing Windows Forms and Controls at Run Time . . . . . . . .
Adding Graphics and Animation Effects . . . . . . . . . . . . . . . . . . .
Inheriting Forms and Creating Base Classes . . . . . . . . . . . . . . . .
Working with Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Part IV Database

351
375
393
415

and Web Programming

18 Getting Started with ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
19 Data Presentation Using the DataGridView Control . . . . . . . . . 467
20 Creating Web Sites and Web Pages by Using Visual
Web Developer and ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491


v


Best Practices for Software Engineering
Software Estimation:

Demystifying the Black Art

Code Complete,
Second Edition

Steve McConnell

Steve McConnell

ISBN 9780735605350

ISBN 9780735619678

Amazon.com’s pick for “Best Computer Book of 2006”!
Generating accurate software estimates is fairly straightforward—once you understand the art of creating them.
Acclaimed author Steve McConnell demystifies the
process—illuminating the practical procedures, formulas,
and heuristics you can apply right away.

Widely considered one of the best practical guides to
programming—fully updated. Drawing from research,
academia, and everyday commercial practice, McConnell
synthesizes must-know principles and techniques into
clear, pragmatic guidance. Rethink your approach—and
deliver the highest quality code.

Simple Architectures for
Complex Enterprises

Agile Portfolio Management

Jochen Krebs

Roger Sessions

ISBN 9780735625679

Agile processes foster better collaboration, innovation,
and results. So why limit their use to software projects—
when you can transform your entire business? This book
illuminates the opportunities—and rewards—of applying
agile processes to your overall IT portfolio, with best
practices for optimizing results.

The Enterprise and Scrum
Ken Schwaber
ISBN 9780735623378

ISBN 9780735625785

Why do so many IT projects fail? Enterprise consultant
Roger Sessions believes complex problems require
simple solutions. And in this book, he shows how to
make simplicity a core architectural requirement—as
critical as performance, reliability, or security—to achieve
better, more reliable results for your organization.

ALSO SEE
Software Requirements, Second Edition
Karl E. Wiegers
ISBN 9780735618794


More About Software Requirements:
Thorny Issues and Practical Advice
Extend Scrum’s benefits—greater agility, higher-quality
products, and lower costs—beyond individual teams to
the entire enterprise. Scrum cofounder Ken Schwaber
describes proven practices for adopting Scrum principles
across your organization, including that all-critical
component—managing change.

Karl E. Wiegers
ISBN 9780735622678

Software Requirement Patterns
Stephen Withall
ISBN 9780735623989

Agile Project Management with Scrum
Ken Schwaber
ISBN 9780735619937

Solid Code

Donis Marshall, John Bruno
ISBN 9780735625921

microsoft.com/mspress

Dev BestPrac_ResPg_02.indd 1


4/4/10 9:41 PM


What do
you think of
this book?
We want to hear from you!
To participate in a brief online survey, please visit:

microsoft.com/learning/booksurvey

Tell us how well this book meets your needs­—what works effectively, and what we can
do better. Your feedback will help us continually improve our books and learning
resources for you.
Thank you in advance for your input!

Stay in touch!
To subscribe to the Microsoft Press® Book Connection Newsletter—for news on upcoming
books, events, and special offers—please visit:
microsoft.com/learning/books/newsletter

SurvPage_corp.indd 1

8/14/09 4:40 AM



×