Visual Basic 2005: A Developer's Notebook

3.33 avg rating
( 3 ratings by Goodreads )
 
9780596007263: Visual Basic 2005: A Developer's Notebook
View all copies of this ISBN edition:
 
 

When Microsoft introduced the Visual Basic .NET programming language, as part of its move to the .NET Framework two years ago, many developers willingly made the switch. Millions of others, however, continued to stick with Visual Basic 6. They weren't ready for such a radical change, which included an object-oriented environment similar to Java. They liked the old Visual Basic just fine.In an effort to win over those diehard VB6 developers, the company has included a new version of VB.NET in its upcoming next generation release of the Visual Studio .NET development platform. Visual Basic 2005 comes with innovative language constructs, new compiler features, dramatically enhanced productivity and an improved debugging experience. The language's new version is now available in beta release, and Microsoft is encouraging developers to give it a test drive.Visual Basic 2005: A Developer's Notebook provides the ideal test track. With nearly 50 hands-on projects, this practical introduction to VB 2005 will bring you up to speed on all the new features of this language by allowing you to work with them directly. The book summarizes the changes that VB 2005 brings, and tells you how to acquire, install and configure the beta version of VB 2005 SDK. Each project or experiment explores a different feature, with emphasis on changes that can increase productivity, simplify programming tasks, and help you add new functionality to your applications.This one-of-a-kind book also offers suggestions for further experimentation, links to on-line documentation and other sources of information, and practical notes and warnings from the author.The new Developer's Notebooks series from O'Reilly offers an in-depth first look at important new tools for software developers. Emphasizing example over explanation and practice over theory, they focus on learning by doing you'll get the goods straight from the masters, in an informal and code-intensive style. For those who want to get up speed with VB 2005 right away, this is the perfect all lab, no lecture guide.

"synopsis" may belong to another edition of this title.

About the Author:

Matthew MacDonald is a developer, author, and educator in all things Visual Basic and .NET. He's worked with Visual Basic and ASP since their initial versions, and written over a dozen books on the subject, including The Book of VB .NET (No Starch Press) and Visual Basic 2005: A Developer's Notebook (O'Reilly). He has also written Excel 2007:The Missing Manual, Excel 2007 for Starters: The Missing Manual, Access 2007:The Missing Manual, and Access 2007 for Starters: The Missing Manual, all from O'Reilly. His web site is http://www.prosetech.com/.

Excerpt. Reprinted by permission. All rights reserved.:

CHAPTER 2 The Visual Basic Language

When Visual Basic .NET first appeared, loyal VB developers were shocked to find dramatic changes in their favorite language. Suddenly, common tasks such as instantiating an object and declaring a structure required new syntax, and even basic data types like the array had been transformed into something new. Fortunately, Visual Basic 2005 doesn’t have the same shocks in store. The language changes in the latest version of VB are refinements that simplify life without making any existing code obsolete. Many of these changes are language features imported from C# (e.g., operator overloading), while others are completely new ingredients that have been built into the latest version of the common language runtime (e.g., generics). In this chapter, you’ll learn about all the most useful changes to the VB language.

Use the My Objects to Program Common Tasks

The new My objects provide easy access to various features that developers often need but don’t necessarily know where to find in the sprawling .NET class library. Essentially, the My objects offer one-stop shopping, with access to everything from the Windows registry to the current network connection. Best of all, the My object hierarchy is organized according to use and is easy to navigate using Visual Studio IntelliSense.

How do I do that?

There are seven first-level My objects. Out of these, three core objects centralize functionality from the .NET Framework and provide computer information. These include:

My.Computer
This object provides information about the current computer, including its network connection, the mouse and keyboard state, the printer and screen, and the clock. You can also use this object as a jumping-off point to play a sound, find a file, access the registry, or use the Windows clipboard.

My.Application
This object provides information about the current application and its context, including the assembly and its version, the folder where the application is running, the culture, and the command-line arguments that were used to start the application. You can also use this object to log an application event.

My.User
This object provides information about the current user. You can use this object to check the user’s Windows account and test what groups the user is a member of.

Along with these three objects, there are another two objects that provide default instances. Default instances are objects that .NET creates automatically for certain types of classes defined in your application. They include:

My.Forms
This object provides a default instance of each Windows form in your application. You can use this object to communicate between forms without needing to track form references in another class.

My.WebServices
This object provides a default proxy-class instance for every web service. For example, if your project uses two web references, you can access a ready-made proxy class for each one through this object.

Finally, there are two other My objects that provide easy access to the configuration settings and resources:

My.Settings
This object allows you to retrieve custom settings from your application’s XML configuration file.

My.Resources
This object allows you to retrieve resources—blocks of binary or text data that are compiled into your application assembly. Resources are typically used to store localized strings, images, and audio files.

W A R N I N G
Note that the My objects are influenced by the project type. For example, when creating a web or console application, you won’t be able to use My.Forms.

Some of the My classes are defined in the Microsoft.VisualBasic. MyServices namespace, while others, such as the classes used for the My.Settings and My.Resources objects, are created dynamically by Visual Studio 2005 when you modify application settings and add resources to the current project.

To try out the My object, you can use Visual Studio IntelliSense. Just type My, followed by a period, and take a look at the available objects, as shown in Figure 2-1. You can choose one and press the period again to step down another level.

To try a simple example that displays some basic information using the My object, create a new console project. Then, add this code to the Main( ) routine:

Console.WriteLine(My.Computer.Name)
Console.WriteLine(My.Computer.Clock.LocalTime)
Console.WriteLine(My.Application.CurrentDirectory)
Console.WriteLine(My.User.Identity.Name)

When you run this code, you’ll see some output in the console window, which shows the computer name, current time, application directory, and user:

SALESSERVER
2005-10-1 8:08:52 PM
C:\Code\VBNotebook\1.07\MyTest\bin
MATTHEW

W A R N I N G
The My object also has a "dark side." Use of the My object makes it more difficult to share your solution with non-VB developers, because other languages, such as C#, don’t have the same feature.

Where can I learn more?
You can learn more about the My object and see examples by looking up the "My Object" index entry in the MSDN Help. You can also learn more by examining some of this book’s other labs that use the My object. Some examples include:

· Using My.Application to retrieve details of your program, such as the current version and the command-line parameters used to start it (see the "Get Application Information" lab in this chapter).

· Using My.Resources to load images and other resources from the application assembly (see the "Use Strongly Typed Resources" lab in this chapter).

· Using My.Settings to retrieve application and user settings (see the "Use Strongly Typed Configuration Settings" lab in this chapter).

· Using My.Forms to interact between application windows (see the "Communicate Between Forms" lab in Chapter 3).

· Using My.Computer to perform file manipulation and network tasks in Chapters 5 and 6.

· Using My.User to authenticate the current user (see the "Test Group Membership of the Current User" lab in Chapter 6).

"About this title" may belong to another edition of this title.

Other Popular Editions of the Same Title

9788173666162: (VISUAL BASIC 2005: A DEVELOPER'S NOTEBOOK: A DEVELOPER'S NOTEBOOK) BY MACDONALD, MATTHEW(AUTHOR)Paperback May-2005

Featured Edition

ISBN 10:  8173666164 ISBN 13:  9788173666162
Publisher: O'Reilly Media, Inc, USA, 2005
Softcover

Top Search Results from the AbeBooks Marketplace

1.

MacDonald, Matthew
Published by O'Reilly Media 2005-05-05 (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 1
Seller:
DontPayMore
(Lindenhurst, NY, U.S.A.)
Rating
[?]

Book Description O'Reilly Media 2005-05-05, 2005. Paperback. Condition: New. 1. 0596007264 New Condition. Ships immediately. Seller Inventory # Z0596007264ZN

More information about this seller | Contact this seller

Buy New
3.54
Convert currency

Add to Basket

Shipping: 0.77
Within U.S.A.
Destination, rates & speeds

2.

Matthew MacDonald
Published by O'Reilly Media (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 1
Seller:
Ergodebooks
(RICHMOND, TX, U.S.A.)
Rating
[?]

Book Description O'Reilly Media, 2005. Paperback. Condition: New. 1. Seller Inventory # DADAX0596007264

More information about this seller | Contact this seller

Buy New
8.38
Convert currency

Add to Basket

Shipping: 3.05
Within U.S.A.
Destination, rates & speeds

3.

Matthew MacDonald
Published by O'Reilly Media (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Softcover Quantity Available: 1
Seller:
Irish Booksellers
(Portland, ME, U.S.A.)
Rating
[?]

Book Description O'Reilly Media, 2005. Condition: New. book. Seller Inventory # M0596007264

More information about this seller | Contact this seller

Buy New
13.51
Convert currency

Add to Basket

Shipping: 2.50
Within U.S.A.
Destination, rates & speeds

4.

Matthew MacDonald
Published by O'Reilly Media, Inc, USA, United States (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 1
Seller:
The Book Depository
(London, United Kingdom)
Rating
[?]

Book Description O'Reilly Media, Inc, USA, United States, 2005. Paperback. Condition: New. Language: English. Brand new Book. When Microsoft introduced the Visual Basic programming language, as part of its move to the Framework two years ago, many developers willingly made the switch. Millions of others, however, continued to stick with Visual Basic 6. They weren't ready for such a radical change, which included an object-oriented environment similar to Java. They liked the old Visual Basic just fine. In an effort to win over those diehard VB6 developers, the company has included a new version of in its upcoming next generation release of the Visual Studio development platform. Visual Basic 2005 comes with innovative language constructs, new compiler features, dramatically enhanced productivity and an improved debugging experience. The language's new version is now available in beta release, and Microsoft is encouraging developers to give it a test drive. Visual Basic 2005: A Developer's Notebook provides the ideal test track. With nearly 50 hands-on projects, this practical introduction to VB 2005 will bring you up to speed on all the new features of this language by allowing you to work with them directly.The book summarizes the changes that VB 2005 brings, and tells you how to acquire, install and configure the beta version of VB 2005 SDK. Each project or experiment explores a different feature, with emphasis on changes that can increase productivity, simplify programming tasks, and help you add new functionality to your applications. This one-of-a-kind book also offers suggestions for further experimentation, links to on-line documentation and other sources of information, and practical notes and warnings from the author. The new Developer's Notebooks series from O'Reilly offers an in-depth first look at important new tools for software developers. Emphasizing example over explanation and practice over theory, they focus on learning by doing you'll get the goods straight from the masters, in an informal and code-intensive style. For those who want to get up speed with VB 2005 right away, this is the perfect all lab, no lecture guide. Seller Inventory # AAH9780596007263

More information about this seller | Contact this seller

Buy New
16.34
Convert currency

Add to Basket

Shipping: FREE
From United Kingdom to U.S.A.
Destination, rates & speeds

5.

MacDonald, Matthew
Published by O'Reilly Media
ISBN 10: 0596007264 ISBN 13: 9780596007263
New PAPERBACK Quantity Available: > 20
Seller:
Mediaoutlet12345
(Springfield, VA, U.S.A.)
Rating
[?]

Book Description O'Reilly Media. PAPERBACK. Condition: New. 0596007264 *BRAND NEW* Ships Same Day or Next!. Seller Inventory # SWATI2132914862

More information about this seller | Contact this seller

Buy New
13.71
Convert currency

Add to Basket

Shipping: 3.05
Within U.S.A.
Destination, rates & speeds

6.

Matthew MacDonald
Published by O'Reilly Media, Inc, USA, United States (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 1
Seller:
Book Depository International
(London, United Kingdom)
Rating
[?]

Book Description O'Reilly Media, Inc, USA, United States, 2005. Paperback. Condition: New. Language: English. Brand new Book. When Microsoft introduced the Visual Basic programming language, as part of its move to the Framework two years ago, many developers willingly made the switch. Millions of others, however, continued to stick with Visual Basic 6. They weren't ready for such a radical change, which included an object-oriented environment similar to Java. They liked the old Visual Basic just fine. In an effort to win over those diehard VB6 developers, the company has included a new version of in its upcoming next generation release of the Visual Studio development platform. Visual Basic 2005 comes with innovative language constructs, new compiler features, dramatically enhanced productivity and an improved debugging experience. The language's new version is now available in beta release, and Microsoft is encouraging developers to give it a test drive. Visual Basic 2005: A Developer's Notebook provides the ideal test track. With nearly 50 hands-on projects, this practical introduction to VB 2005 will bring you up to speed on all the new features of this language by allowing you to work with them directly.The book summarizes the changes that VB 2005 brings, and tells you how to acquire, install and configure the beta version of VB 2005 SDK. Each project or experiment explores a different feature, with emphasis on changes that can increase productivity, simplify programming tasks, and help you add new functionality to your applications. This one-of-a-kind book also offers suggestions for further experimentation, links to on-line documentation and other sources of information, and practical notes and warnings from the author. The new Developer's Notebooks series from O'Reilly offers an in-depth first look at important new tools for software developers. Emphasizing example over explanation and practice over theory, they focus on learning by doing you'll get the goods straight from the masters, in an informal and code-intensive style. For those who want to get up speed with VB 2005 right away, this is the perfect all lab, no lecture guide. Seller Inventory # AAH9780596007263

More information about this seller | Contact this seller

Buy New
16.89
Convert currency

Add to Basket

Shipping: FREE
From United Kingdom to U.S.A.
Destination, rates & speeds

7.

Matthew MacDonald
Published by O'Reilly Media, Inc, USA
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 2
Seller:
THE SAINT BOOKSTORE
(Southport, United Kingdom)
Rating
[?]

Book Description O'Reilly Media, Inc, USA. Paperback. Condition: New. New copy - Usually dispatched within 2 working days. Seller Inventory # B9780596007263

More information about this seller | Contact this seller

Buy New
13.87
Convert currency

Add to Basket

Shipping: 6.94
From United Kingdom to U.S.A.
Destination, rates & speeds

8.

Matthew MacDonald (author)
Published by O'Reilly Media 2005-05-06, Beijing |Farnham (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New paperback Quantity Available: 1
Seller:
Blackwell's
(Oxford, OX, United Kingdom)
Rating
[?]

Book Description O'Reilly Media 2005-05-06, Beijing |Farnham, 2005. paperback. Condition: New. Seller Inventory # 9780596007263

More information about this seller | Contact this seller

Buy New
18.72
Convert currency

Add to Basket

Shipping: 7.50
From United Kingdom to U.S.A.
Destination, rates & speeds

9.

MacDonald, Matthew
Published by O'Reilly Media (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 2
Seller:
Murray Media
(NORTH MIAMI BEACH, FL, U.S.A.)
Rating
[?]

Book Description O'Reilly Media, 2005. Paperback. Condition: New. Never used!. Seller Inventory # P110596007264

More information about this seller | Contact this seller

Buy New
27.16
Convert currency

Add to Basket

Shipping: FREE
Within U.S.A.
Destination, rates & speeds

10.

Matthew MacDonald/ MacDonald Matthew
Published by Oreilly & Associates Inc (2005)
ISBN 10: 0596007264 ISBN 13: 9780596007263
New Paperback Quantity Available: 2
Seller:
Revaluation Books
(Exeter, United Kingdom)
Rating
[?]

Book Description Oreilly & Associates Inc, 2005. Paperback. Condition: Brand New. illustrated edition. 262 pages. 9.00x7.00x0.75 inches. In Stock. Seller Inventory # __0596007264

More information about this seller | Contact this seller

Buy New
27.67
Convert currency

Add to Basket

Shipping: 7.50
From United Kingdom to U.S.A.
Destination, rates & speeds

There are more copies of this book

View all search results for this book