Exits the message loop on the current thread and closes all windows on the thread.
Public Shared Sub ExitThread
public static void ExitThread()
public: static void ExitThread()
static member ExitThread : unit -> unit
Use this method to exit the message loop of the current thread. This method causes the call to Run for the current thread to return. To exit the entire application, call Exit.
for the immediate caller to call unmanaged code. Associated enumeration: SecurityPermissionFlag..::.UnmanagedCode
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2