ebook img

Visual Basic 2005 demystified PDF

362 Pages·2006·2.423 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Visual Basic 2005 demystified

VISUAL BASIC 2005 DEMYSTIFIED This page intentionally left blank VISUAL BASIC 2005 DEMYSTIFIED JEFF KENT McGraw-Hill New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto FMM.iindddd iiiiii 1111//44//22000055 1100:5533:5599 AM Copyright © 2006 by The McGraw-Hill Companies. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-148675-5. The material in this eBook also appears in the print version of this title: 0-07-226171-4. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at [email protected] or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0072261714 Professional Want to learn more? We hope you enjoy this McGraw-Hill eBook! If you’d like more information about this book, its author, or related books and websites, please click here. I would like to dedicate this book to my younger daughter, Emily Rebecca Kent. Being a teenager is never easy and even more diffi cult during these times. Emily, I am proud of your recent progress, and hope it continues as you approach, all too soon for a parent, becoming a young adult. I love you very much. —Dad ABOUT THE AUTHOR Jeff Kent is an Associate Professor of Computer Science at Los Angeles Valley College in Valley Glen, California. He teaches a number of programming languages, including Visual Basic, C++, C#, Java, and, when he’s feeling masochistic, Assembler. He also manages a network for a Los Angeles law firm whose employees are guinea pigs for his applications, and as an attorney gives advice to young attorneys whether they want to hear it or not. He also has written several books on computer programming, recently Visual Basic.NET: A Beginner’s Guide and C++ Demystified (McGraw-Hill/Osborne), and, concurrently with this book, Visual C# 2005 Demystified (McGraw-Hill). Jeff has had a varied career—or careers. He graduated from UCLA with a Bachelor of Science degree in economics and then went on to obtain a Juris Doctor degree from Loyola (Los Angeles) School of Law and to practice law. During this time, when personal computers were still a gleam in Bill Gates’s eye, Jeff was also a professional chess master, earning a third place finish in the United States Under- 21 Championship and, later, an international title. Jeff does find time to spend with his wife, Devvie, which is not difficult since she is also a computer science professor at Valley College. In addition to his other career pursuits, he has a part-time job as personal chauffeur for his teenage daughter Emily (his older daughter Elise now has her own driver’s license), and in what little spare time he has, he enjoys watching international chess tournaments on the Internet. His goal is to resume running marathons, since otherwise, given his losing battle to lose weight, his next book may be Sumo Wrestling Demystified. Copyright © 2006 by The McGraw-Hill Companies. Click here for terms of use. CONTENTS AT A GLANCE PART ONE INTRODUCTION TO VISUAL BASIC 2005 CHAPTER 1 Getting Started with Your First Windows Program 3 CHAPTER 2 Writing Your First Code 19 CHAPTER 3 Controls 43 PART TWO PROGRAMMING BUILDING BLOCKS: VARIABLES, DATA TYPES, AND OPERATORS CHAPTER 4 Storing Information—Data Types and Variables 65 CHAPTER 5 Letting the Program Do the Math—Arithmetic Operators 79 CHAPTER 6 Making Comparisons—Comparison and Logical Operators 97 PART THREE CONTROLLING THE FLOW OF THE PROGRAM CHAPTER 7 Making Choices—If and Select Case Control Structures 115 CHAPTER 8 Repeating Yourself—Loops and Arrays 139 CHAPTER 9 Organizing Your Code with Procedures 157 vii Visual Basic 2005 Demystifi ed viii PART FOUR THE USER INTERFACE CHAPTER 10 Helper Forms 179 CHAPTER 11 Menus 197 CHAPTER 12 Toolbars 221 PART FIVE ACCESSING DATA CHAPTER 13 Accessing Text Files 239 CHAPTER 14 Databases 255 CHAPTER 15 Web Applications 277 Final Exam 301 Answers to Quizzes and Final Exam 307 Index 325

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.