APPLICATION

The Application object represents the running application at a very high level. It provides properties and methods for starting an event loop to process Windows messages, possibly for a form. It also provides methods for controlling and stopping the event loop.

Don’t confuse the Application object with the My.Application namespace. The two have somewhat similar purposes but very different features.

The following sections describe the Application object’s most useful properties, methods, and events.

Application Properties

The following table describes the Application object’s most useful properties.

PROPERTY PURPOSE
CommonAppDataPath Returns the path where the program should store application data shared by all users. By default, this path has the form base_path\company_name\product_name\product_version. The base_path is typically C:\Documents and Settings\All Users\Application Data.
CommonAppDataRegistry Returns the registry key where the program should store application data shared by all users. By default, this path has the form HKEY_LOCAL_MACHINE\Software\company_name\product_name\product_version.
CompanyName Returns the application’s company name.
CurrentCulture Gets or sets the CultureInfo object for this thread.
CurrentInputLanguage Gets or sets the InputLanguage for this thread.
ExecutablePath Returns the fully qualified path to the file that started the execution, including the filename.
LocalUserAppDataPath Returns the path where the program ...

Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.