Name
Application Class
Namespace
System.Windows.Forms
Createable
No
Description
The Application object provides a diverse range of functionality, including support for multithreaded programming, access to the system registry, and support for subclassing (intercepting messages sent to application windows). It also includes a variety of informational functions, such as properties to retrieve the company name, to retrieve the application’s executable path, and to retrieve the application’s name and version.
Application objects can be created as follows:
Dim obj As Application
However, because all of the Application object’s members are shared, you do not need to instantiate the Application object to access its properties and methods. Hence, you can retrieve the executable path of your application, for instance, with the code fragment:
Dim sPath As String = Application.ExecutablePath
Application class members marked with a plus sign (+) are discussed in detail in their own entries.
Public Properties
AllowQuit |
CommonAppDataPath |
CommonAppDataRegistry |
CompanyName + |
CurrentCulture |
CurrentInputLanguage |
ExecutablePath + |
LocalUserAppDataPath |
MessageLoop |
ProductName + |
ProductVersion + |
SafeTopLevelCaptionFormat |
StartupPath |
UserAppDataPath |
UserAppDataRegistry |
Public Shared Methods
AddMessageFilter |
DoEvents + |
Exit |
ExitThread |
OleRequired |
OnThreadException |
RemoveMessageFilter |
Run |
Public Shared Events
ApplicationExit |
Idle |
ThreadException |
ThreadExit |
Get VB.NET Language in a Nutshell, Second Edition 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.