Beginning Visual Basic 2015

Bryan Newsome

CREDITS

 Senior Acquisitions Editor: Kenyon Brown
Project Editor: Maureen S. Tullis
Technical Editor: Valan Money
Production Editor: Dassi Zeidel
Copy Editor: Scott D. Tullis
Manager of Content Development & Assembly: Mary Beth Wakefield
Marketing Director: David Mayhew
Marketing Manager: Carrie Sherrill
Professional Technology & Strategy Director: Barry Pruett
Business Manager: Amy Knies
Associate Publisher: Jim Minatel
Project Coordinator, Cover: Brent Savage
Proofreader: Nancy Carrasco
Indexer: Johnna VanHoose Dinse
Cover Designer: Wiley
Cover Image: ©anasimin/iStockphoto

e-books shop
e-books shop
Purchase Now !
Just with Paypal


Book Details
 Price
 3.00 USD
 Pages
 745 p
 File Size
 14,387 KB
 File Type
 PDF format
 ISBN
 978-1-119-09211-7
 978-1-119-09207-0 (ebk)
 978-1-119-09208-7 (ebk)
 Copyright   
 2016 by John Wiley & Sons, Inc 

About the Author
BRYAN NEWSOME leads a team of top developers specializing in Microsoft
solutions. Since starting building Visual Basic 5 solutions, he has embraced each
new version of Visual Basic and now creates all new solutions leveraging the .NET
platform and VB.NET. He provides clients with solutions and mentoring on
leading-edge Microsoft technologies. For VB.NET, Bryan is a Microsoft Certified
Application Developer.

ABOUT THE TECHNICAL EDITOR
VALAN MONEY is a Microsoft Certified Solution Developer for Web and
Windows applications. He has been using Visual Basic since 1996 and got his first
certification in Visual Basic 4.0. Since then, he has also received certifications in
newer versions of VB and VB.NET. He works as Technical Team Lead and Senior
Consultant for projects using Microsoft technologies. He holds a Masters degree in
Computer Science from St. Joseph’s College, Tiruchirappalli, India.

Table of Contents
INTRODUCTION
WHO THIS BOOK IS FOR
WHAT THIS BOOK COVERS
WHAT YOU NEED TO USE THIS BOOK
CONVENTIONS
SOURCE CODE
ERRATA
P2P.WROX.COM
1 WELCOME TO VISUAL BASIC 2015
IMPLEMENTING EVENT-DRIVEN PROGRAMMING
INSTALLING VISUAL BASIC 2015
THE VISUAL STUDIO 2015 IDE
CREATING A SIMPLE APPLICATION
USING THE HELP SYSTEM
SUMMARY
2 THE MICROSOFT .NET FRAMEWORK
THE .NET VISION
WRITING SOFTWARE FOR WINDOWS
COMMON LANGUAGE RUNTIME
THE COMMON TYPE SYSTEM AND COMMON LANGUAGE
SPECIFICATION
SUMMARY
3 WRITING SOFTWARE
INFORMATION AND DATA
WORKING WITH VARIABLES
COMMENTS AND WHITESPACE
DATA TYPES
STORING VARIABLES
METHODS
SUMMARY
4 CONTROLLING THE FLOW
MAKING DECISIONS
THE IF STATEMENT
SELECT CASE
LOOPS
SUMMARY
5 WORKING WITH DATA STRUCTURES
UNDERSTANDING ARRAYS
UNDERSTANDING ENUMERATIONS
UNDERSTANDING CONSTANTS
STRUCTURES
WORKING WITH ARRAYLISTS
WORKING WITH COLLECTIONS
BUILDING LOOKUP TABLES WITH HASHTABLE
ADVANCED ARRAY MANIPULATION
SUMMARY
6 BUILDING WINDOWS APPLICATIONS
RESPONDING TO EVENTS
COUNTING CHARACTERS
COUNTING WORDS
CREATING MORE COMPLEX APPLICATIONS
CREATING THE TOOLBAR
CREATING THE STATUS BAR
CREATING AN EDIT BOX
CLEARING THE EDIT BOX
RESPONDING TO TOOLBAR BUTTONS
USING MULTIPLE FORMS
ABOUT DIALOG
SUMMARY
7 DISPLAYING DIALOGS
THE MESSAGEBOX
THE OPENFILEDIALOG CONTROL
THE SAVEDIALOG CONTROL
THE FONTDIALOG CONTROL
THE COLORDIALOG CONTROL
THE PRINTDIALOG CONTROL
THE FOLDERBROWSERDIALOG CONTROL
SUMMARY
8 CREATING MENUS
UNDERSTANDING MENU FEATURES
CREATING MENUS
CONTEXT MENUS
SUMMARY
9 DEBUGGING AND ERROR HANDLING
MAJOR ERROR TYPES
DEBUGGING
ERROR HANDLING
USING STRUCTURED ERROR HANDLING
SUMMARY
10 BUILDING OBJECTS
UNDERSTANDING OBJECTS
BUILDING CLASSES
REUSABILITY
DESIGNING AN OBJECT
CONSTRUCTORS
INHERITANCE
OBJECTS AND STRUCTURES
THE FRAMEWORK CLASSES
SUMMARY
11 ADVANCED OBJECT-ORIENTED TECHNIQUES
BUILDING A FAVORITES VIEWER
AN ALTERNATIVE FAVORITE VIEWER
USING SHARED PROPERTIES AND METHODS
UNDERSTANDING OBJECT-ORIENTED PROGRAMMING AND
MEMORY MANAGEMENT
SUMMARY
12 ACCESSING DATA USING STRUCTURED QUERY LANGUAGE
WHAT YOU NEED TO COMPLETE THIS CHAPTER’S EXERCISES
WHAT IS A DATABASE?
UNDERSTANDING BASIC SQL SYNTAX
EXECUTING QUERIES IN SQL SERVER
SUMMARY
13 DATABASE PROGRAMMING WITH SQL SERVER AND ADO.NET
ADO.NET
ADO.NET DATA NAMESPACES
THE ADO.NET CLASSES IN ACTION
DATA BINDING
SUMMARY
14 ASP.NET
THIN-CLIENT ARCHITECTURE
WEB FORMS VERSUS WINDOWS FORMS
WEB APPLICATIONS: THE BASIC PIECES
ACTIVE SERVER PAGES
BUILDING WEBSITES
SUMMARY
15 DEPLOYING YOUR APPLICATION
WHAT IS DEPLOYMENT?
VISUAL STUDIO 2015 SETUP APPLICATION OPTIONS
DEPLOYING DIFFERENT SOLUTIONS
SUMMARY
16 WINDOWS 8 APPS
WINDOWS 8 APPLICATION DESIGN PRINCIPLES
APPLICATION LAYOUT
SUMMARY
APPENDIX EXERCISE SOLUTIONS
ADVERT
EULA

Bookscreen
e-books shop

Introduction
VISUAL BASIC 2015 IS Microsoft’s latest version of the highly popular Visual
Basic .NET programming language, one of the many languages supported in
Visual Studio 2015. Visual Basic 2015’s strength lies in its ease of use and the
speed at which you can create Windows Forms and Windows 8 applications, web
applications, and mobile device applications.
In this book, we introduce you to programming with Visual Basic 2015 and show
you how to create these types of applications and services. Along the way you’ll
also learn about object-oriented techniques and learn how to create your own
business objects and Windows controls.
Microsoft’s .NET Framework provides Visual Basic 2015 programmers with the
capability to create full object-oriented programs, just like the ones created using
C# or C++. The .NET Framework provides a set of base classes that are common
to all programming languages in Visual Studio 2015, which provides you with the
same capability to create object-oriented programs as a programmer using C# or
C++.
This book will give you a thorough grounding in the basics of programming using
Visual Basic 2015; from there the world is your oyster.

WHO THIS BOOK IS FOR
This book is designed to teach you how to write useful programs in Visual Basic
2015 as quickly and easily as possible.
There are two kinds of beginners for whom this book is ideal:
You’re a beginner to programming and you’ve chosen Visual Basic 2015 as the
place to start. That’s a great choice! Visual Basic 2015 is not only easy to learn,
it’s also fun to use and very powerful.
You can program in another language but you’re a beginner to .NET
programming. Again, you’ve made a great choice! Whether you’ve come from
Fortran or Cobol, you’ll find that this book quickly gets you up to speed on
what you need to know to get the most from Visual Basic 2015.

WHAT THIS BOOK COVERS
Visual Basic 2015 offers a great deal of functionality in both tools and language.
No one book could ever cover Visual Basic 2015 in its entirety—you would need a
library of books. What this book aims to do is to get you started as quickly and
easily as possible. It shows you the roadmap, so to speak, of what there is and
where to go. Once we’ve taught you the basics of creating working applications
(creating the windows and controls, how your code should handle unexpected
events, what object-oriented programming is, how to use it in your applications,
and so on) we’ll show you some of the areas you might want to try your hand at
next:
Chapters 1 through 8 provide an introduction to Visual Studio 2015 and Windows programming.
Chapter 9 provides an introduction to application debugging and error handling.
Chapter 10 provides an introduction to object-oriented programming and building objects.
Chapter 11 provides an introduction to creating Windows Forms user controls.
Chapters 12 and 13 provide an introduction to programming with databases
and covers Structured Query Language, SQL Server, and ADO.NET.
Chapter 14 provides an introduction to ASP.NET and shows you how to write applications for the web.
Chapter 15 introduces you to deploying applications using ClickOnce technology.
Chapter 16 show you how to build your first Windows 8 application and
introduces you to design principles for touch interfaces.

WHAT YOU NEED TO USE THIS BOOK
Apart from a willingness to learn, all you’ll need are a PC running Windows 8
(preferred), Windows 7, Windows Server 2008 R2, Windows Server 2015;
Internet Explorer; and of course:
Microsoft Visual Basic 2015Community Edition or higher
For the database chapters, you should install SQL Server 2014 Express, although,
any edition you have should work with little to no changes required.
Previous Post Next Post