Deitel & Deitel. Books and Cyber Classrooms published by. Prentice Hall. How to
Program Series. C How to Program, 2/E. C++ How to Program, 2/E. Java How ...
VISUAL BASIC 6 HOW TO PROGRAM
Deitel & Deitel Books and Cyber Classrooms published by
Prentice Hall How to Program Series C How to Program, 2/E C++ How to Program, 2/E Java How to Program, 2/E Java How to Program with an Introduction to Visual J++ (1.0), 1/E Visual Basic 6 How to Program, 1/E Multimedia Cyber Classroom Series C & C++ Multimedia Cyber Classroom, 2/E Java Multimedia Cyber Classroom, 2/E Visual Basic 6 Multimedia Cyber Classroom, 1/E A Complete Training Course Series A Complete C++ Training Course, 2/E A Complete Java Training Course, 2/E A Complete Visual Basic 6 Training Course, 1/E For continuing updates on Prentice Hall and Deitel & Associates, Inc. publications visit the Prentice Hall web site http//www.prenhall.com/deitel
To communicate with the authors, send email to:
[email protected]
For information on corporate on-site seminars and public seminars offered by Deitel & Associates, Inc. worldwide, visit: http://www.deitel.com
VISUAL BASIC 6 HOW TO ™
PROGRAM H. M. Deitel Deitel & Associates, Inc.
P. J. Deitel Deitel & Associates, Inc.
T. R. Nieto Deitel & Associates, Inc.
PRENTICE HALL, Upper Saddle River, New Jersey 07458
Library of Congress Cataloging in Publication Data
Deitel, Harvey M. Visual Basic 6 how to program / H. M. Deitel, P. J. Deitel, Tem Nieto p. cm. -Includes bibliographical references and index. ISBN 0-13-456955-5 1. Microsoft Visual Basic 2. BASIC (Computer program language) I. Deitel, Paul J. II. Nieto, Tem. III. Title. QA76.73.B3D46 1999 005.26’8--dc21 98-44388 CIP
Acquisitions Editor: Laura Steele Production Editor: Camille Trentacoste Chapter Opener and Cover Designer: Tamara Newnam Cavallo Buyer: Patrick Brown Editorial Assistant: Kate Kaibni
© 1999 by Prentice-Hall, Inc. Simon & Schuster / A Viacom Company Upper Saddle River, New Jersey 07458
The authors and publisher of this book have used their best efforts in preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The authors and publisher make no warranty of any kind, expressed or implied, with regard to these programs or to the documentation contained in this book. The authors and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks and registerd trademarks. Where those designations appear in this book, and Prentice-Hall and the autors were aware of a trademark claim, the designations have been printed in initial caps or all caps. All product names mentioned remain trademarks or registered trademarks of thier respective owners.
All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1
ISBN 0-13-456955-5
Prentice-Hall International (UK) Limited, London Prentice-Hall of Australia Pty. Limited, Sydney Prentice-Hall Canada Inc., Toronto Prentice-Hall Hispanoamericana, S.A., Mexico Prentice-Hall of India Private Limited, New Delhi Prentice-Hall of Japan, Inc., Tokyo Simon & Schuster of Asia Pte. Ltd., Singapore Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro
TO
Susanne Peterson Manager of University Curriculum Programs Microsoft Research Unit Microsoft Corporation and our mentor at Microsoft. Thank you for your extraordinary efforts in the conception and implementation of our Visual Studio Series of academic textbooks including Visual Basic 6 How to Program and our forthcoming titles Visual J++ 6 How to Program Visual C++ 6 How to Program Visual InterDev 6 How to Program. Your enthusiasm, expertise, market savvy and commitment to this series has made creating these books a sheer joy. Thank you for being the special person that you are. Harvey, Paul and Tem