Processes the specified range of Windows messages currently in the message queue.
[Visual Basic] Overloads Public Shared Sub DoEvents( _ ByVal messageStart As Integer, _ ByVal messageEnd As Integer _ ) [C#] public static void DoEvents( int messageStart, int messageEnd ); [C++] public: static void DoEvents( int messageStart, int messageEnd ); [JScript] public static function DoEvents( messageStart : int, messageEnd : int );
Exception Type | Condition |
---|---|
ArgumentException | messageEnd is less than messageStart |
Use this method to specify a narrow range of messages to be processed, such as Microsoft.Win32.Interop.win.WM_MOUSEFIRST to Microsoft.Win32.Interop.win.WM_MOUSELAST. It is typically used in looping code to allow messages to be processed.
CAUTION Calling this method can cause cause code to be re-entered if a message raises an event.
NGWS Runtime Security:
UIPermission | You must have the System.security.Permissions.UIPermission for AllWindows to set this method. |
Application Class | Application Members | System.WinForms Namespace | Application.DoEvents Overload List | Exit | ExitThread | DoEvents | Run