This documentation is archived and is not being maintained.

Application Class

Provides static (Shared in Visual Basic) methods and properties to manage an application, such as methods to start and stop an application, to process Windows messages, and properties to get information about an application. This class cannot be inherited.

For a list of all members of this type, see Application Members.


[Visual Basic]
NotInheritable Public Class Application
public sealed class Application
public __gc __sealed class Application
public class Application

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The Application class has methods to start and stop applications and threads, and to process Windows messages. Call Run to start an application message loop on the current thread and, optionally, to make a form visible. Call Exit or ExitThread to stop a message loop. Call DoEvents to process messages while your program is in a loop. Call AddMessageFilter to add a message filter to the application message pump to monitor Windows messages. An IMessageFilter lets you stop an event from being raised or perform special operations before invoking an event handler.

This class has CurrentCulture and CurrentInputLanguage properties to get or set culture information for the current thread.

You cannot create an instance of this class.


Namespace: System.Windows.Forms

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System.Windows.Forms (in System.Windows.Forms.dll)

See Also

Application Members | System.Windows.Forms Namespace