Application.MessageLoop Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value indicating whether a message loop exists on this thread.

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

public static bool MessageLoop { get; }

Property Value

Type: System.Boolean

true if a message loop exists; otherwise, false.

When hosting Windows Forms in other environments, such as unmanaged applications, this property will always return false. Use RegisterMessageLoop to instruct Windows Forms if the hosting environment still has an active message loop.

.NET Framework
Available since 1.1
Return to top
Show: