NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application Class

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

Object
   Application

[Visual Basic]
NotInheritable Public Class Application
[C#]
public sealed class Application
[C++]
public __gc __sealed class Application
[JScript]
public class Application

Remarks

The Application class has methods to start and stop applications and threads, and to allow processing of 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 allow messages to be processed 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 an event-handling method is invoked.

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

The CommonUserAppDataPath, MyDocuments, LocalUserAppDataPath, and UserAppDataPath properties specify the location of user data.

Requirements

Namespace: System.WinForms

Assembly: System.WinForms.dll

Example

[The example code here should use Run, DoEvents and Exit.]

See Also

Application Members | System.WinForms Namespace