Visual Basic

Programming with Microsoft Visual Basic 2015 7/e



2016 年7 版




New to This Edition!
UPDATED VIDEOS These notes direct students to videos that accompany each chapter in the book. The videos explain and/or demonstrate one or more of the chapter's concepts. The videos have been revised from the previous edition and are available via the optional MindTap for this text.
NEW CHAPTER CASES, EXAMPLES, APPLICATIONS, REVIEW QUESTIONS, AND EXERCISES The chapters contain new Chapter Cases, code examples, sample applications, Review Questions, and Exercises.
CHAPTERS 2, 5 , 6 , AND 12 The Visible property is now introduced in Chapter 2 rather than in Chapter 5. Coverage of the priming and update reads was moved from Chapter 6's Lesson A to Chapter 6's Lesson B. The topics covered in Chapter 6's Lesson B are now covered in its Lesson C and vice versa. The Financial.Pmt function is covered in Chapter 6's Lesson B. Chapter 12, which covers Web applications, has been revamped.

Programming with Microsoft Visual Basic 2015, Seventh Edition is an exceptional textbook because it also includes the following features:
READ THIS BEFORE YOU BEGIN This section is consistent with Cengage Learning's unequaled commitment to helping instructors introduce technology into the classroom.
Technical considerations and assumptions about hardware, software, and default settings are listed in one place to help instructors save time and eliminate unnecessary aggravation.
YOU DO IT! BOXES These boxes provide simple applications that allow students to demonstrate their understanding of a concept before moving on to the next concept. The YOU DO IT! boxes are located almost exclusively in Lesson A of each chapter.
VISUAL STUDIO 2015 METHODS The book focuses on Visual Studio 2015 methods rather than on Visual Basic functions. Exceptions to this are the Val and Format functions, which are introduced in Chapter 2. These functions are covered in the book simply because it is likely that students will encounter them in existing Visual Basic programs. However, in Chapter 3, the student is taught to use the TryParse method and the Convert class methods rather than the Val function. Also in Chapter 3, the Format function is replaced with the ToString method.
OPTION STATEMENTS All programs include the Option Explicit, Option Strict, and Option Infer statements.
START HERE ARROWS These arrows indicate the beginning of a tutorial steps section in the book.
DATABASES, LINQ, AND SQL The book includes two chapters (Chapters 13 and 14) on databases. LINQ is covered in Chapter 13. SQL is covered in Chapter 14.
FIGURES Figures that introduce new statements, functions, or methods contain both the syntax and examples of using the syntax. Including the syntax in the figures makes the examples more meaningful, and vice versa.
CHAPTER CASES Each chapter begins with a programming-related problem that students could reasonably expect to encounter in business, followed by a demonstration of an application that could be used to solve the problem. Showing the students the completed application before they learn how to create it is motivational and instructionally sound. By allowing the students to see the type of application they will be able to create after completing the chapter, the students will be more motivated to learn because they can see how the programming concepts they are about to learn can be used and, therefore, why the concepts are important.
LESSONS Each chapter is divided into three lessons-A, B, and C. Lesson A introduces the programming concepts that will be used in the completed application. The concepts are illustrated with code examples and sample applications. The user interface for each sample application is provided to the student. Also provided are tutorial-style steps that guide the student on coding, running, and testing the application. Each sample application allows the
student to observe how the current concept can be used before the next concept is introduced. In Lessons Band/or C, the student creates the application required to solve the problem specified in the Chapter Case.
APPENDICES Appendix A, which can be covered after Chapter 3, teaches students how to locate and correct errors (syntax, logic, and run time) in their code. The appendix shows students how to step through their code and also how to create breakpoints. Appendix B summarizes the GUI design guidelines taught in the chapters, making it easier for the student to follow the guidelines when designing an application's interface. Appendix C lists the Visual Basic conversion functions. Appendix D contains a Cheat Sheet that summarizes important concepts covered in the chapters, such as the syntex of statements, methods, and so on. The Cheat Sheet provides a convenient place for students to locate the information 出ey need as they are creating and coding their applications. Appendix E contains Case Projects that can be assigned after completing specific chapters in the book. Appendix F, which is available online at, covers multiple-form applications and the FontDialog, ColorDialog, and TabControl tools.
GUI DESIGN TIP BOXES The GUI DESIGN TIP boxes contain guidelines and recommendations for designing applications that follow Windows standards. Appendix B provides a summary of the GUI design guidelines covered in the chapters.
TIP These notes provide additional information about the current concept. Examples include alternative ways of writing statements or performing tasks, as well as warnings about common mistakes made when using a particular command and reminders of related concepts learned in previous chapters.
SUMMARY Each lesson contains a Summary section that recaps the concepts covered in the lesson.
KEY TERMS Following the Summary section in each lesson is a listing of the key terms introduced throughout the lesson, along with their definitions.
REVIEW QUESTIONS Each lesson contains Review Questions designed to test a student’s understanding of the lesson’s concepts.
EXERCISES The Review Questions in each lesson are followed by Exercises, which provide students with additional practice of the skills and concepts they learned in the lesson. The Exercises are designated as INTRODUCTORY, INTER扎任DIATE, ADVANCED, DISCOVERY, and SWAT THE BUGS. The DISCOVERY Exercises encourage students to challenge and independently develop their own programming skills while exploring the capabilities of Visual Basic 2015. The SWAT THE BUGS Exercises provide an opportunity for students to detect and correct errors in an application’s code.

Prolific author and respected professional, Diane Zak continues to provide an inspiring and uncomplicated learning experience for students through her widely popular programming books. Recognized for their unique, readable, and friendly style, each book reflects Zak’s knowledge of student needs and her extensive understanding of computer programming and its use in business today. Each book is carefully crafted with the modern student in mind. Diane Zak holds a Bachelor of Science degree in Computer Information Systems, a Bachelor of Science degree in Accounting, and a Master of Arts degree in Adult and Continuing Education. She has taught at various computer training centers and most recently served as professor at College of DuPage in Illinois.

Overview. An Introduction to Programming.
1. An Introduction to Visual Basic 2015.
2. Designing Applications.
3. Using Variables and Constants.
4. The Selection Structure.
5. More on the Selection Structure.
6. The Repetition Structure.
7. Sub and Function Procedures.
8. String Manipulation.
9. Arrays.
10. Structures and Sequential Access Files.
11. Classes and Objects.
12. Web Applications.
13. Working with Access Databases and LINQ.
14. Access Databases and SQL.
Appendix A: Finding and Fixing Program Errors.
Appendix B: GUI Design Guidelines.
Appendix C: Visual Basic Conversion Functions.
Appendix D: Visual Basic 2015 Cheat Sheet.
Appendix E: Case Projects.
Appendix F (online): Multiple Forms and Dialogs Boxes.