ApplicationBase ApplicationBase ApplicationBase ApplicationBase Class


Provides properties, methods, and events related to the current application.

public ref class ApplicationBase
public class ApplicationBase
type ApplicationBase = class
Public Class ApplicationBase


This example uses the My.Application.GetEnvironmentVariable method to get and display the value of the PATH environment variable, if this value is available. Otherwise, it displays a message that indicates that the PATH environment variable does not exist.

Private Sub TestGetEnvironmentVariable()
        MsgBox("PATH = " & My.Application.GetEnvironmentVariable("PATH"))
    Catch ex As System.ArgumentException
        MsgBox("Environment variable 'PATH' does not exist.")
    End Try
End Sub


The properties exposed by the My.Application object return data that is associated only with the current application or DLL. No system-level information can be altered with My.Application.

The My.Application object consists of the following classes:


ApplicationBase() ApplicationBase() ApplicationBase() ApplicationBase()

Initializes a new instance of the ApplicationBase class.


Culture Culture Culture Culture

Gets the culture that the current thread uses for string manipulation and string formatting.

Info Info Info Info

Gets an object that provides properties for getting information about the application's assembly, such as the version number, description, and so on.

Log Log Log Log

Gets an object that provides properties and methods for writing event and exception information to the application's log listeners.

UICulture UICulture UICulture UICulture

Gets the culture that the current thread uses for retrieving culture-specific resources.


ChangeCulture(String) ChangeCulture(String) ChangeCulture(String) ChangeCulture(String)

Changes the culture used by the current thread for string manipulation and for string formatting.

ChangeUICulture(String) ChangeUICulture(String) ChangeUICulture(String) ChangeUICulture(String)

Changes the culture that the current thread uses for retrieving culture-specific resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnvironmentVariable(String) GetEnvironmentVariable(String) GetEnvironmentVariable(String) GetEnvironmentVariable(String)

Returns the value of the specified environment variable.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also