Exits the message loop on the current thread and closes all windows on the thread.
[Visual Basic] Public Shared Sub ExitThread() [C#] public static void ExitThread(); [C++] public: static void ExitThread(); [JScript] public static function ExitThread();
Use this method to exit the message loop of the current thread. This method will cause the call to Run for the current thread to return. To exit the entire application, call System.WinForms.App.Application.Exit.
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 | Exit