Application.RegisterMessageLoop Method (Application.MessageLoopCallback)
Registers a callback for checking whether the message loop is running in hosted environments.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] public static void RegisterMessageLoop( Application.MessageLoopCallback callback )
The method to call when Windows Forms needs to check if the hosting environment is still sending messages.
This method is used when hosting Windows Forms in another environment, such as an unmanaged application. In hosted environments, the MessageLoop property will always return false if Windows Forms is not processing messages. Use this callback to tell Windows Forms if the hosting environment is still processing messages.
Available since 2.0