235 references to IsDisposed
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (1)
693If _splashScreen IsNot Nothing AndAlso Not _splashScreen.IsDisposed Then
System.Windows.Forms (55)
System\Windows\Forms\ApplicationContext.cs (1)
103if (!_mainForm.IsDisposed)
System\Windows\Forms\Control.cs (5)
3504if (IsDisposed && _threadCallbackList is not null && _threadCallbackList.Count > 0) 9052if (!IsDisposed) 11320if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11393if (IsDisposed) 11579&& !IsDisposed
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1072if (Disposing || IsDisposed)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
14616if (!_dataGridViewOper[OperationInDispose] && !IsDisposed) 14945&& !IsDisposed) 15868&& !IsDisposed 16672if (_dataGridViewOper[OperationInDispose] || IsDisposed) 30121_dataGridViewOper[OperationInDispose] || IsDisposed ? null : Events[staticEvent] as T;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
2795if (DataGridView is null || DataGridView.IsDisposed) 2831if (DataGridView is not null && !DataGridView.IsDisposed && !DataGridView.Disposing)
System\Windows\Forms\Controls\Labels\Label.cs (1)
1180if (Disposing || IsDisposed)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
865if (Disposing || IsDisposed)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
1053if (Disposing || IsDisposed)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
3983if (IsDisposed)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1310if (IsDisposed)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
367if (!IsDisposed)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
1403if (!IsDropDown && !IsDisposed && !Properties.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell)) 3664if (!Disposing && !IsDisposed) 4089if (!Disposing && !IsDisposed)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (1)
19if (_ownerToolStrip.Disposing || _ownerToolStrip.IsDisposed || _ownerToolStrip.IsDropDown)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1735if (TopLevel && (!IsDisposed || !Disposing)) 1757if (toolStrip is not null && !(toolStrip.IsDisposed || toolStrip.Disposing))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
539if (!IsDisposed)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2665if (parent.Disposing || parent.IsDisposed) 3001if (Owner is not null && !(Owner.IsDisposed || Owner.Disposing))
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
194!toolStrip.IsDisposed &&
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
533if (activeToolStrip.IsDisposed)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.cs (2)
26if (_dropDown is not null && !_dropDown.IsDisposed) 35if (_dropDown is not null && !_dropDown.IsDisposed)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
43if (IsDisposed || _numPaintsServiced != 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
389&& !_wrappedToolStrip.IsDisposed // ensure we have a live-runtime only toolstrip.
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
203if (!Disposing && !IsDisposed)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (14)
232if (tv is null || tv.IsDisposed) 265if (tv is null || tv.IsDisposed) 300if (tv is null || !tv.IsHandleCreated || tv.IsDisposed) 328if (HTREEITEMInternal != IntPtr.Zero && _treeView is not null && !_treeView.IsDisposed) 619if (tv.IsDisposed) 693if (tv is null || tv.IsDisposed) 855if (tv is null || tv.IsDisposed) 960if (tv is null || tv.IsDisposed) 1590if (tv is null || tv.IsDisposed) 1659if (tv is null || tv.IsDisposed) 1821if (tv is null || !tv.IsHandleCreated || tv.IsDisposed) 1976if (tv is null || tv.IsDisposed) 2137if (tv.IsDisposed) 2204if (tv.IsDisposed)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1397ObjectDisposedException.ThrowIf(IsDisposed, this);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
476if (Visible && !Disposing && !IsDisposed)
System\Windows\Forms\ToolTip\ToolTip.cs (2)
196if (TopLevelControl is not null && !TopLevelControl.IsDisposed) 1729if (win is Control control && control.IsDisposed)
System\Windows\Forms\WindowsFormsSynchronizationContext.cs (1)
67if (!control.IsDisposed)
System.Windows.Forms.Design (6)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
361if (Disposing || IsDisposed)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
67if (!_parentControl.IsDisposed)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (1)
103=> DesignerFrame is not null && !DesignerFrame.IsDisposed && DesignerFrame.IsHandleCreated;
System\Windows\Forms\Design\DesignerFrame.cs (1)
119if (selSvc?.PrimarySelection is Control { IsDisposed: false } ctrl)
System\Windows\Forms\Design\SelectionUIService.cs (1)
188if (IsDisposed)
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
230if (_designerFrame is null || _designerFrame.IsDisposed || !_designerFrame.IsHandleCreated)
System.Windows.Forms.Tests (173)
System\Windows\Forms\ApplicationContextTests.cs (9)
175Assert.True(mainForm.IsDisposed); 179Assert.True(mainForm.IsDisposed); 188Assert.True(mainForm.IsDisposed); 192Assert.True(mainForm.IsDisposed); 196Assert.True(mainForm.IsDisposed); 252Assert.True(mainForm.IsDisposed); 256Assert.True(mainForm.IsDisposed); 266Assert.False(mainForm.IsDisposed); 270Assert.False(mainForm.IsDisposed);
System\Windows\Forms\ButtonBaseTests.cs (24)
4567Assert.Equal(callCount > 0, control.IsDisposed); 4581Assert.True(control.IsDisposed); 4592Assert.True(control.IsDisposed); 4619Assert.Equal(callCount > 0, control.IsDisposed); 4633Assert.True(control.IsDisposed); 4644Assert.True(control.IsDisposed); 4674Assert.Equal(callCount > 0, control.IsDisposed); 4688Assert.True(control.IsDisposed); 4699Assert.True(control.IsDisposed); 4722Assert.Equal(callCount > 0, control.IsDisposed); 4736Assert.True(control.IsDisposed); 4747Assert.True(control.IsDisposed); 4774Assert.Equal(callCount > 0, control.IsDisposed); 4788Assert.True(control.IsDisposed); 4799Assert.True(control.IsDisposed); 4829Assert.Equal(callCount > 0, control.IsDisposed); 4843Assert.True(control.IsDisposed); 4854Assert.True(control.IsDisposed); 4878Assert.False(control.IsDisposed); 4889Assert.False(control.IsDisposed); 4919Assert.False(control.IsDisposed); 4930Assert.False(control.IsDisposed); 4963Assert.False(control.IsDisposed); 4974Assert.False(control.IsDisposed);
System\Windows\Forms\ControlTests.Methods.cs (52)
983Assert.Equal(callCount > 0, control.IsDisposed); 995Assert.True(control.IsDisposed); 1005Assert.True(control.IsDisposed); 1034Assert.Equal(callCount > 0, control.IsDisposed); 1048Assert.True(control.IsDisposed); 1059Assert.True(control.IsDisposed); 1088Assert.Equal(callCount > 0, control.IsDisposed); 1108Assert.True(control.IsDisposed); 1110Assert.True(child1.IsDisposed); 1112Assert.True(child2.IsDisposed); 1129Assert.True(control.IsDisposed); 1131Assert.True(child1.IsDisposed); 1133Assert.True(child2.IsDisposed); 1161Assert.Equal(callCount > 0, control.IsDisposed); 1173Assert.True(control.IsDisposed); 1183Assert.True(control.IsDisposed); 1216Assert.Equal(callCount > 0, control.IsDisposed); 1228Assert.True(control.IsDisposed); 1242Assert.True(control.IsDisposed); 1285Assert.Equal(callCount > 0, control.IsDisposed); 1297Assert.True(control.IsDisposed); 1307Assert.True(control.IsDisposed); 1332Assert.False(control.IsDisposed); 1342Assert.False(control.IsDisposed); 1371Assert.Equal(callCount > 0, control.IsDisposed); 1385Assert.True(control.IsDisposed); 1396Assert.True(control.IsDisposed); 1428Assert.False(control.IsDisposed); 1439Assert.False(control.IsDisposed); 1468Assert.Equal(callCount > 0, control.IsDisposed); 1488Assert.True(control.IsDisposed); 1490Assert.True(child1.IsDisposed); 1492Assert.True(child2.IsDisposed); 1509Assert.True(control.IsDisposed); 1511Assert.True(child1.IsDisposed); 1513Assert.True(child2.IsDisposed); 1556Assert.False(control.IsDisposed); 1558Assert.False(child1.IsDisposed); 1560Assert.False(child2.IsDisposed); 1577Assert.False(control.IsDisposed); 1579Assert.False(child1.IsDisposed); 1581Assert.False(child2.IsDisposed); 1609Assert.Equal(callCount > 0, control.IsDisposed); 1621Assert.True(control.IsDisposed); 1631Assert.True(control.IsDisposed); 1659Assert.False(control.IsDisposed); 1669Assert.False(control.IsDisposed); 1702Assert.Equal(callCount > 0, control.IsDisposed); 1714Assert.True(control.IsDisposed); 1728Assert.True(control.IsDisposed); 1767Assert.False(control.IsDisposed); 1781Assert.False(control.IsDisposed);
System\Windows\Forms\DataGridViewCellTests.cs (8)
354Assert.False(menu.IsDisposed); 3336Assert.False(menu.IsDisposed); 3506Assert.False(menu.IsDisposed); 3511Assert.False(menu.IsDisposed); 3516Assert.True(menu.IsDisposed); 3543Assert.False(menu.IsDisposed); 3548Assert.False(menu.IsDisposed); 3553Assert.True(menu.IsDisposed);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (2)
2038Assert.False(menu.IsDisposed); 2124Assert.False(menu.IsDisposed);
System\Windows\Forms\StatusStripTests.cs (8)
917Assert.Equal(callCount > 0, control.IsDisposed); 930Assert.True(control.IsDisposed); 941Assert.True(control.IsDisposed); 970Assert.Equal(callCount > 0, control.IsDisposed); 983Assert.True(control.IsDisposed); 994Assert.True(control.IsDisposed); 1036Assert.False(control.IsDisposed); 1047Assert.False(control.IsDisposed);
System\Windows\Forms\ToolStripControlHostTests.cs (8)
2583Assert.False(c.IsDisposed); 2595Assert.True(c.IsDisposed); 2603Assert.True(c.IsDisposed); 2625Assert.False(c.IsDisposed); 2637Assert.True(c.IsDisposed); 2645Assert.True(c.IsDisposed); 2669Assert.False(c.IsDisposed); 2677Assert.False(c.IsDisposed);
System\Windows\Forms\ToolStripDropDownTests.cs (27)
3050Assert.Equal(callCount > 0, control.IsDisposed); 3063Assert.True(control.IsDisposed); 3075Assert.True(control.IsDisposed); 3107Assert.Equal(callCount > 0, control.IsDisposed); 3120Assert.True(control.IsDisposed); 3133Assert.True(control.IsDisposed); 3163Assert.Equal(callCount > 0, control.IsDisposed); 3176Assert.True(control.IsDisposed); 3188Assert.True(control.IsDisposed); 3223Assert.Equal(callCount > 0, control.IsDisposed); 3244Assert.True(control.IsDisposed); 3264Assert.True(control.IsDisposed); 3294Assert.Equal(callCount > 0, control.IsDisposed); 3307Assert.True(control.IsDisposed); 3319Assert.True(control.IsDisposed); 3346Assert.False(control.IsDisposed); 3357Assert.False(control.IsDisposed); 3388Assert.Equal(callCount > 0, control.IsDisposed); 3401Assert.True(control.IsDisposed); 3414Assert.True(control.IsDisposed); 3447Assert.False(control.IsDisposed); 3460Assert.False(control.IsDisposed); 3496Assert.Equal(callCount > 0, control.IsDisposed); 3517Assert.True(control.IsDisposed); 3537Assert.True(control.IsDisposed); 3586Assert.False(control.IsDisposed); 3605Assert.False(control.IsDisposed);
System\Windows\Forms\ToolStripTests.cs (19)
4368Assert.Equal(callCount > 0, control.IsDisposed); 4381Assert.True(control.IsDisposed); 4393Assert.True(control.IsDisposed); 4422Assert.Equal(callCount > 0, control.IsDisposed); 4435Assert.True(control.IsDisposed); 4447Assert.True(control.IsDisposed); 4482Assert.Equal(callCount > 0, control.IsDisposed); 4503Assert.True(control.IsDisposed); 4523Assert.True(control.IsDisposed); 4553Assert.Equal(callCount > 0, control.IsDisposed); 4566Assert.True(control.IsDisposed); 4578Assert.True(control.IsDisposed); 4605Assert.False(control.IsDisposed); 4616Assert.False(control.IsDisposed); 4650Assert.Equal(callCount > 0, control.IsDisposed); 4671Assert.True(control.IsDisposed); 4691Assert.True(control.IsDisposed); 4740Assert.False(control.IsDisposed); 4759Assert.False(control.IsDisposed);
System\Windows\Forms\WebBrowserTests.cs (16)
2532Assert.Equal(callCount > 0, control.IsDisposed); 2545Assert.True(control.IsDisposed); 2556Assert.True(control.IsDisposed); 2587Assert.Equal(callCount > 0, control.IsDisposed); 2600Assert.True(control.IsDisposed); 2611Assert.True(control.IsDisposed); 2635Assert.Equal(callCount > 0, control.IsDisposed); 2648Assert.True(control.IsDisposed); 2659Assert.True(control.IsDisposed); 2692Assert.False(control.IsDisposed); 2703Assert.False(control.IsDisposed); 2734Assert.Equal(callCount > 0, control.IsDisposed); 2747Assert.True(control.IsDisposed); 2758Assert.True(control.IsDisposed); 2784Assert.False(control.IsDisposed); 2795Assert.False(control.IsDisposed);