O'Reilly logo

Visual Basic 2012 Programmer's Reference by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix S

The My Namespace

The My namespace provides shortcuts to make performing common tasks easier. The following sections describe the major items within the My namespace and describe the tools that they make available.

MY.APPLICATION

My.Application provides information about the current application. It includes properties that tell you the program’s current directory, culture, Log object, and splash screen. It also includes information about the application’s assembly, including the program’s version numbering.

The following table describes the most useful My.Application properties, methods, and events.

ITEM PURPOSE
ApplicationContext Returns an ApplicationContext object for the currently executing thread. It provides a reference to the thread’s form. Its ExitThread method terminates the thread, and its ThreadExit event fires when the thread is exiting.
ChangeCurrentCulture Changes the thread’s culture used for string manipulation and formatting.
ChangeCurrentUICulture Changes the thread’s culture used for retrieving resources.
CommandLineArgs Returns a collection containing the command-line arguments used when the application was started. The first entry (with index 0) is the fully qualified name of the executable application.
CurrentCulture Returns a CultureInfo object that represents the settings used for culture-specific string manipulation and formatting. This includes calendar information, date and time specifications, the culture’s name, keyboard layout, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required