Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Basic
 My.Application Object Members
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Basic Language Reference
My.Application Object Members

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

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.

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.

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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker