Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Application Class
Collapse the table of content
Expand the table of content

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.

System.Object
   System.Windows.Forms.Application

[Visual Basic]
NotInheritable Public Class Application
[C#]
public sealed class Application
[C++]
public __gc __sealed class Application
[JScript]
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.

Remarks

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.

Requirements

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

Show:
© 2015 Microsoft