Mastering Microsoft Visual Basic 2010 (eBook)

eBook Download: EPUB
2010 | 1. Auflage
1056 Seiten
Wiley (Verlag)
978-0-470-64082-1 (ISBN)

Lese- und Medienproben

Mastering Microsoft Visual Basic 2010 -  Evangelos Petroutsos
Systemvoraussetzungen
40,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
The new edition of the ultimate comprehensive guide to Microsoft Visual Basic

Where most VB books start with beginner level topics, Mastering Visual Basic 2010 vaults you right into intermediate and advanced coverage. From the core of the language and user interface design to developing data-driven applications, this detailed book brings you thoroughly up to speed and features numerous example programs you can use to start building your own apps right away.

  • Covers Visual Basic 2010, part of Microsoft's Visual Studio integrated development environment (IDE), which includes C#, C++, Visual Web Developer, and ASP.NET, along with Visual Basic
  • Explains topics in the thorough, step-by-step style of all books in the Mastering series, providing you ample instruction, tips, and techniques
  • Helps you build your own applications by supplying sample code you can use to start development
  • Includes review exercises in each chapter to reinforce concepts as you learn

All the books in the Sybex Mastering series feature comprehensive and expert coverage of topics you can put to immediate use.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.



Evangelos Petroutsos is a computer engineer who has worked for the California Institute of Technology and MCI. Currently, he writes computer books and articles, teaches networking and programming courses, and works as a computer communications consultant. He is the author of the Sybex titles Mastering Microsoft Visual Basic 2008 and Mastering Microsoft Visual Basic 2005, among other books.


The new edition of the ultimate comprehensive guide to Microsoft Visual Basic Where most VB books start with beginner level topics, Mastering Visual Basic 2010 vaults you right into intermediate and advanced coverage. From the core of the language and user interface design to developing data-driven applications, this detailed book brings you thoroughly up to speed and features numerous example programs you can use to start building your own apps right away. Covers Visual Basic 2010, part of Microsoft's Visual Studio integrated development environment (IDE), which includes C#, C++, Visual Web Developer, and ASP.NET, along with Visual Basic Explains topics in the thorough, step-by-step style of all books in the Mastering series, providing you ample instruction, tips, and techniques Helps you build your own applications by supplying sample code you can use to start development Includes review exercises in each chapter to reinforce concepts as you learn All the books in the Sybex Mastering series feature comprehensive and expert coverage of topics you can put to immediate use. Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

Evangelos Petroutsos is a computer engineer who has worked for the California Institute of Technology and MCI. Currently, he writes computer books and articles, teaches networking and programming courses, and works as a computer communications consultant. He is the author of the Sybex titles Mastering Microsoft Visual Basic 2008 and Mastering Microsoft Visual Basic 2005, among other books.

Introduction xxv

Part 1 * Visual Basic: The Language 1

Chapter 1 * Getting Started with Visual Basic 2010 3

Chapter 2 * Handling Data 37

Chapter 3 * Visual Basic Programming Essentials 85

Part 2 * Developing Windows Applications 127

Chapter 4 * GUI Design and Event-Driven Programming129

Chapter 5 * Basic Windows Controls 161

Chapter 6 * Working with Forms 203

Chapter 7 * More Windows Controls 253

Part 3 * Working with Custom Classes and Controls303

Chapter 8 * Working with Objects 305

Chapter 9 * Building Custom Windows Controls 355

Chapter 10 * Applied Object-Oriented Programming 387

Part 4 * Working with the .NET Framework 431

Chapter 11 * The Framework at Large 433

Chapter 12 * Storing Data in Collections 493

Chapter 13 * XML in Modern Programming 529

Chapter 14 * An Introduction to LINQ 577

Part 5 * Developing Data-Driven Applications629

Chapter 15 * Programming with ADO.NET 631

Chapter 16 * Developing Data-Driven Applications 687

Chapter 17 * Using the Entity Data Model 725

Chapter 18 * Building Data-Bound Applications 769

Part 6 * Developing for the Web 813

Chapter 19 * Accessing the Web 815

Chapter 20 * Building Web Applications 845

Chapter 21 * Building and Using Web Services 893

Appendix * The Bottom Line 941

Index 987

Introduction

Welcome to Microsoft's Visual Basic 2010, another milestone version of the most popular programming language for building Windows and web applications. In modern software development, however, the language is only one of the components we use to build applications. The most important component is the .NET Framework, which is an indispensable component of every application; it's actually more important than the language itself. You can think of the Framework as an enormous collection of functions for just about any programming task. All drawing methods, for example, are part of the System.Drawing class. To draw a rectangle, you call the DrawRectangle method of the System.Drawing class, passing the appropriate arguments. To create a new folder, you call the CreateDirectory method of the Directory class, and to retrieve the files in a folder, you call the GetFiles method of the same class.

The Framework contains all the functionality of the operating system and makes it available to your application through methods. Methods are very similar to functions, which extend the basic capabilities of a language. The Framework is a huge collection of such methods, organized in units according to their role and in a way that makes it fairly easy to locate the methods for the task at hand. The language and the Framework are the two “programming” components absolutely necessary to build Windows applications. It's possible to develop applications with these two components alone, but the process would be awfully slow.

The software development process relies on numerous tools that streamline the coding experience. The third component is an integrated environment that hosts those tools, enabling you to perform many common tasks with point-and-click operations. It's basically an environment in which you can design your forms with visual tools and write code as well. This environment, provided by Visual Studio, is known as an integrated development environment, or IDE. You'll be amazed by the functionality provided by the tools of Visual Studio: you can actually design a functional data-driven application without writing a single line of code. You can use similar tools in the same environment to design a fancy data-driven web page without a single line of code. Visual Studio even provides tools for manipulating databases and allows you to switch between tasks, all in the same, streamlined environment. You realize, of course, that Visual Studio isn't about writing applications without code; it just simplifies certain tasks through wizards, and more often than not, we step in and provide custom code to write a functional application. Even so, Visual Studio provides numerous tools, from debugging tools that help you track and fix all kinds of bugs in your code to database-manipulation tools and deployment wizards that streamline the process of deploying applications.

This book shows you how to use Visual Studio 2010 and Visual Basic 2010 to design rich Windows and web applications. We'll start with the visual tools and then we'll explore Visual Basic and the Framework. A Windows application consists of a visual interface and code behind the elements of the interface. (The code handles the user actions on the visual interface, such as the click of a button, the selection of a menu item, and so on.) You'll use the tools of Visual Studio to build the visual interface, and then you'll program the elements of the application with Visual Basic. For any nontrivial processing, such as file and folder manipulation, data storage, and so on, you'll use the appropriate classes of the .NET Framework. A substantial segment of this book deals with the most useful components of the Framework. We will also explore databases and data-driven applications, which are the most common type of business applications. Finally, we'll go through the basics of web programming. You'll learn how to build web applications with Visual Basic and how to write web services.

The Mastering Series

The Mastering series from Sybex provides outstanding instruction for readers with intermediate and advanced skills in the form of top-notch training and development for those already working in their field and clear, serious education for those aspiring to become pros. Every Mastering book includes the following:

  • Real-World Scenarios, ranging from case studies to interviews, that show how the tool, technique, or knowledge presented is applied in actual practice
  • Skill-based instruction, with chapters organized around real tasks rather than abstract concepts or subjects
  • Self-review test questions, so you can be certain you're equipped to do the job right

Who Should Read This Book?

You don't need a solid knowledge of Visual Basic to read this book, but you do need a basic understanding of programming. You need to know the meaning of variables and functions and how an If…Then structure works. This book is aimed at the typical programmer who wants to get the most out of Visual Basic. It covers the topics I felt are of use to most VB programmers, and it does so in depth. Visual Basic 2010 and the .NET Framework 4.0 are two extremely rich programming tools, and I had to choose between a superficial coverage of many topics and an in-depth coverage of fewer topics. To make room for more topics, I have avoided including a lot of reference material and lengthy listings. For example, you won't find complete project listings or form descriptions. I assume that you can draw a few controls on a form and set their properties and that you don't need long descriptions of the control properties (even if you don't know how to design a form, you'll learn how in the first two chapters). I'm also assuming that you don't want to read the trivial segments of each application. Instead, the listings concentrate on the “meaty” part of the code: the procedures that explain the topic at hand.

The topics covered in this book were chosen to provide a solid understanding of the principles and techniques for developing applications with Visual Basic. Programming isn't about new keywords and functions. I chose the topics I felt every programmer should learn in order to master the language. I was also motivated by my desire to present useful, practical examples. You will not find all topics equally interesting or important. My hope is that everyone will find something interesting and something of value for their daily work—whether it's an application that maps the folders and files of a drive to a TreeView control, an application that prints tabular data, a data-driven application for editing customers or products, or an application that saves a collection of objects to a file.

Many books offer their readers long, numbered sequences of steps to accomplish a task. Following instructions simplifies certain tasks, but programming isn't about following instructions. It's about being creative; it's about understanding principles and being able to apply the same techniques in several practical situations. And the way to creatively exploit the power of a language such as Visual Basic 2010 is to understand its principles and its programming model.

In many cases, I provide a detailed, step-by-step procedure that will help you accomplish a task, such as designing a menu, for example. But not all tasks are as simple as designing menus. I explain why things must be done in a certain way, and I present alternatives and try to connect new topics to those explained earlier in the book. In several chapters, I expand on applications developed in earlier chapters. Associating new knowledge with something you have mastered already provides positive feedback and a deeper understanding of the language.

This book isn't about the hottest features of the language either; it's about solid programming techniques and practical examples. After you master the basics of programming Windows applications with Visual Basic 2010 and you feel comfortable with the more advanced examples of the book, you will find it easy to catch up with the topics not discussed in this book.

How about the Advanced Topics?

Some of the topics discussed in this book are nontrivial, and quite a few topics can be considered advanced. Creating collections of custom objects and querying them and exposing some functionality in the form of web services are not trivial topics, but these are the tools that will allow you to make the most of Visual Studio.

You may also find some examples to be more difficult than you expected. I have tried to make the text and the examples easy to read and understand, but not unrealistically simple. Understanding the basic functions for manipulating files and folders isn't difficult. To make the most of these functions, however, you need to understand how to scan a folder's files, including the files in its subfolders and the files in their subfolders, with a technique known as recursion. To make each chapter as useful as possible, I've included nontrivial examples, which will provide a better understanding of the topics. In addition, many of these examples can be easily incorporated into your applications.

You can do a lot with the TreeView control with very little programming, but to make the most out of this control, you must be ready for some advanced programming—nothing terribly complicated, but some things just aren't trivial. Programming most of the operations of the TreeView...

Erscheint lt. Verlag 15.12.2010
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge Visual Basic
Informatik Software Entwicklung Objektorientierung
Schlagworte Computer Science • Informatik • Programmierung / Visual Basic • Programming / Visual Basic • Visual BASIC
ISBN-10 0-470-64082-0 / 0470640820
ISBN-13 978-0-470-64082-1 / 9780470640821
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Adobe DRM)
Größe: 21,2 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich