2 instantiations of ThreadContext
System.Windows.Forms (2)
winforms\Managed\System\WinForms\Application.cs (2)
3048context = new ThreadContext(); 3064context = new ThreadContext();
85 references to ThreadContext
System.Windows.Forms (85)
winforms\Managed\System\WinForms\Application.cs (65)
116return ThreadContext.FromCurrent().GetAllowQuit(); 127return ThreadContext.FromCurrent().ComponentManager.FContinueIdle(); 348return ThreadContext.FromCurrent().CustomThreadExceptionHandlerAttached; 429return ThreadContext.FromCurrent().GetMessageLoop(); 595ThreadContext.FromCurrent().RegisterMessageLoop(callback); 660ThreadContext.FromCurrent().RegisterMessageLoop(null); 863ThreadContext.FromCurrent().AddMessageFilter(value); 884bool processed = ThreadContext.FromCurrent().ProcessFilters(ref msg, out modified); 904ThreadContext current = ThreadContext.FromCurrent(); 914ThreadContext current = ThreadContext.FromCurrent(); 931ThreadContext current = ThreadContext.FromCurrent(); 938ThreadContext current = ThreadContext.FromCurrent(); 955ThreadContext current = ThreadContext.FromCurrent(); 962ThreadContext current = ThreadContext.FromCurrent(); 978ThreadContext current = ThreadContext.FromCurrent(); 984ThreadContext current = ThreadContext.FromCurrent(); 1014ThreadContext.FromCurrent().BeginModalMessageLoop(null); 1023ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEvents, null); 1029ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEventsModal, null); 1076ThreadContext.FromCurrent().EndModalMessageLoop(null); 1139ThreadContext.ExitApplication(); 1162ThreadContext context = ThreadContext.FromCurrent(); 1178ThreadContext.FromCurrent().FormActivated(activated); 1241private static ThreadContext GetContextForHandle(HandleRef handle) { 1245ThreadContext cxt = ThreadContext.FromId(id); 1311ThreadContext cxt = GetContextForHandle(handle); 1324ThreadContext cxt = ThreadContext.FromCurrent(); 1337return ThreadContext.FromCurrent().OleRequired(); 1345ThreadContext.FromCurrent().OnThreadException(t); 1355ThreadContext cxt = GetContextForHandle(handle); 1372ThreadContext current = ThreadContext.FromCurrent(); 1384ThreadContext.FromCurrent().RemoveMessageFilter(value); 1486ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext()); 1495ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext(mainForm)); 1506ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, context); 1517ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopModalForm, new ModalApplicationContext(form)); 2122Application.ThreadContext.FromCurrent().DisposeThreadWindows(); 2336private static ThreadContext currentThreadContext; 2970ThreadContext[] ctxs = new ThreadContext[contextHash.Values.Count]; 3044internal static ThreadContext FromCurrent() { 3045ThreadContext context = currentThreadContext; 3061internal static ThreadContext FromId(int id) { 3062ThreadContext context = (ThreadContext)contextHash[(object)id]; 4150Application.ThreadContext ctx = Application.ThreadContext.FromId(id); 4155!Object.ReferenceEquals(ctx, Application.ThreadContext.FromCurrent())) { 4289Control activatingControl = Application.ThreadContext.FromCurrent().ActivatingControl; 4326private ThreadContext parentWindowContext; 4328private delegate void ThreadWindowCallback(ThreadContext context, bool onlyWinForms); 4377private void DisableThreadWindowsCallback(ThreadContext context, bool onlyWinForms) { 4381private void EnableThreadWindowsCallback(ThreadContext context, bool onlyWinForms) {
winforms\Managed\System\WinForms\Control.cs (3)
1245Application.ThreadContext.FromCurrent().ActivatingControl = (value) ? this : null; 4402Application.ThreadContext ctx = Application.ThreadContext.FromId(threadId);
winforms\Managed\System\WinForms\NativeWindow.cs (2)
177Application.ThreadContext ctx = Application.ThreadContext.FromId(id);
winforms\Managed\System\WinForms\ToolStrip.cs (5)
2127Application.ThreadContext.FromCurrent().RemoveMessageFilter(restoreFocusFilter); 3469Application.ThreadContext.FromCurrent().RemoveMessageFilter(RestoreFocusFilter); 4088Application.ThreadContext.FromCurrent().RemoveMessageFilter(RestoreFocusFilter); 4753Application.ThreadContext.FromCurrent().AddMessageFilter(RestoreFocusFilter); 5187Application.ThreadContext.FromCurrent().RemoveMessageFilter(this);
winforms\Managed\System\WinForms\ToolStripComboBox.cs (2)
525Application.ThreadContext.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter); 535Application.ThreadContext.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter);
winforms\Managed\System\WinForms\ToolStripManager.cs (6)
859Application.ThreadContext.FromCurrent().AddMessageFilter(this); 860Application.ThreadContext.FromCurrent().TrackInput(true); 862if (!Application.ThreadContext.FromCurrent().GetMessageLoop(true)) { 908Application.ThreadContext.FromCurrent().RemoveMessageFilter(this); 909Application.ThreadContext.FromCurrent().TrackInput(false); 1433if (Application.ThreadContext.FromCurrent().PreTranslateMessage(ref *msg)) {
winforms\Managed\System\WinForms\WindowsFormsSynchronizationContext.cs (2)
39Application.ThreadContext context = Application.ThreadContext.FromCurrent();