My.Application Object MembersĀ 

The My.Application Object provides properties, methods, and events related to the current application.

Properties

Property Description

ApplicationContext

Gets the ApplicationContext object for the current thread of a Windows Forms application.

This property is available only for Windows Forms applications.

CommandLineArgs

Gets a collection containing the command-line arguments as strings for the current application.

Culture

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

Deployment

Gets the current application's ClickOnce deployment object, which provides support for updating the current deployment programmatically and the on-demand download of files.

Info

Returns the My.Application.Info Object, which provides properties for getting the information about the application's assembly, such as the version number, description, and so on.

IsNetworkDeployed

Gets a Boolean that represents whether the application was network deployed.

Log

Returns the My.Application.Log Object, which provides a property and methods for writing event and exception information to the application's event log listeners.

MinimumSplashScreenDisplayTime

Gets or sets the minimum length of time, in milliseconds, for which the splash screen is displayed.

OpenForms

Gets a collection of all the application's open forms.

This property is available only for Windows Forms applications.

SaveMySettingsOnExit

Determines whether the application saves the user settings on exit.

This property is available only for Windows Forms and console applications.

SplashScreen

Gets or sets the splash screen for this application.

This property is available only for Windows Forms applications.

UICulture

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

Methods

Method Description

ChangeCulture

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

ChangeUICulture

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

DoEvents

Processes all Windows messages currently in the message queue.

This method is available only for Windows Forms applications.

GetEnvironmentVariable

Returns the value of the specified environment variable.

Run

Sets up and starts the Visual Basic Application model.

This method is available only for Windows Forms applications.

Events

Event Description

NetworkAvailabilityChanged

Occurs when the network availability changes.

This event is available only for Windows Forms applications.

Shutdown

Occurs when the application shuts down.

This event is available only for Windows Forms applications.

Startup

Occurs when the application starts.

This event is available only for Windows Forms applications.

StartupNextInstance

Occurs when attempting to start a single-instance application and the application is already active.

This event is available only for Windows Forms applications.

UnhandledException

Occurs when the application encounters an unhandled exception.

This event is available only for Windows Forms applications.

See Also

Reference

My.Application Object