This documentation is archived and is not being maintained.

Application.Run Method (ApplicationContext)

.NET Framework 1.1

Begins running a standard application message loop on the current thread, with an ApplicationContext.

[Visual Basic]
Overloads Public Shared Sub Run( _
   ByVal context As ApplicationContext _
)
[C#]
public static void Run(
 ApplicationContext context
);
[C++]
public: static void Run(
 ApplicationContext* context
);
[JScript]
public static function Run(
   context : ApplicationContext
);

Parameters

context
An ApplicationContext in which the application is run.

Exceptions

Exception Type Condition
InvalidOperationException A main message loop is already running on this thread.

Remarks

The message loop runs until Exit or ExitThread is called or the ThreadExit event is raised on the context object.

Requirements

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

See Also

Application Class | Application Members | System.Windows.Forms Namespace | Application.Run Overload List | Exit | ExitThread | DoEvents

Show: