Visual Basic 2010
Build Rich Client and Web Applications with Visual Basic
Work with the .NET Framework 4.0
Microsoft® Visual Basic® 2010
Microsoft® Visual Basic® 2010
Wiley Publishing, Inc.
Acquisitions Editor: Agatha Kim Development Editor: Mary EllenSchutz Technical Editor: Kirstin Juhl Production Editor: Rachel McConlogue Copy Editors: Judy Flynn and Kim Wimpsett Editorial Manager: Pete Gaughan Production Manager: Tim Tate Vice President and Executive Group Publisher: Richard Swadley Vice President and Publisher: Neil Edde Book Designers: Maureen Forys and Judy Fung Proofreader: Rebecca Rider Indexer: Jack Lewis Project Coordinator, Cover:Lynsey Stanford Cover Designer: Ryan Sneed Cover Image: © Pete Gardner/DigitalVision/Getty Images Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-53287-4 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning orotherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed tothe Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and speciﬁcally disclaim all warranties,including without limitation warranties of ﬁtness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistanceis required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site mayprovide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317)572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Cataloging-in-Publication Data Petroutsos, Evangelos. Mastering Microsoft Visual Basic 2010 / Evangelos Petroutsos. -- 1st ed. p. cm. ISBN 978-0-470-53287-4 (paper/website) 1. Microsoft Visual BASIC. 2.BASIC (Computer program language) I. Title. QA76.73.B3P487 2010 005.2’768--dc22 2010000339 TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its afﬁliates, in the United States and other countries, and may not be used without written permission. Microsoft and Visual Basic are registered trademarks of Microsoft...