Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

14.3. A Namespace Overview

In this section you will get a flavor for the extent of the functionality available via the My namespace. As it is not possible to go through all the classes, methods, and overall functionality available, it is recommended that you use this as a starting point from which to explore further.

14.3.1. My.Application

The My.Application object gives you immediate access to various pieces of information about the application. At the lowest level, My.Application enables you to write to the application log through the subordinate My.Application.Log, as well as to add general information common to all Windows-based projects to the My.Application.Info object.

As mentioned earlier, if the context of My.Application is a Windows service, it also includes information related to the command-line arguments and the method of deployment. Windows Forms applications have all this information in the contextual form My.Application and enable the accessing of various forms-related data.

Prior to My, all of this information was accessible through a variety of methods, but it was difficult to determine where some of the information was. Now the information is all consolidated into one easy-to-use location. To demonstrate the kind of data you can access through My.Application, try the following sample task:

  1. Start Visual Studio 2008 and create a Visual Basic Windows application. Add a button to the form. You'll use the button to display information about the application.

  2. Double-click ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book