236 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 (56)
System\Windows\Forms\ApplicationContext.cs (1)
103if (!_mainForm.IsDisposed)
System\Windows\Forms\Control.cs (5)
3503if (IsDisposed && _threadCallbackList is not null && _threadCallbackList.Count > 0) 9051if (!IsDisposed) 11319if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11392if (IsDisposed) 11578&& !IsDisposed
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1072if (Disposing || IsDisposed)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
14615if (!_dataGridViewOper[OperationInDispose] && !IsDisposed) 14944&& !IsDisposed) 15867&& !IsDisposed 16671if (_dataGridViewOper[OperationInDispose] || IsDisposed) 30120_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)
1052if (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 (2)
367if (!IsDisposed) 1963!SelectedTab.IsDisposed && SelectedTab.TabAccessibilityObject is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
1402if (!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)
193!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)
391&& !_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)
982Assert.Equal(callCount > 0, control.IsDisposed); 994Assert.True(control.IsDisposed); 1004Assert.True(control.IsDisposed); 1033Assert.Equal(callCount > 0, control.IsDisposed); 1047Assert.True(control.IsDisposed); 1058Assert.True(control.IsDisposed); 1087Assert.Equal(callCount > 0, control.IsDisposed); 1107Assert.True(control.IsDisposed); 1109Assert.True(child1.IsDisposed); 1111Assert.True(child2.IsDisposed); 1128Assert.True(control.IsDisposed); 1130Assert.True(child1.IsDisposed); 1132Assert.True(child2.IsDisposed); 1160Assert.Equal(callCount > 0, control.IsDisposed); 1172Assert.True(control.IsDisposed); 1182Assert.True(control.IsDisposed); 1215Assert.Equal(callCount > 0, control.IsDisposed); 1227Assert.True(control.IsDisposed); 1241Assert.True(control.IsDisposed); 1284Assert.Equal(callCount > 0, control.IsDisposed); 1296Assert.True(control.IsDisposed); 1306Assert.True(control.IsDisposed); 1331Assert.False(control.IsDisposed); 1341Assert.False(control.IsDisposed); 1370Assert.Equal(callCount > 0, control.IsDisposed); 1384Assert.True(control.IsDisposed); 1395Assert.True(control.IsDisposed); 1427Assert.False(control.IsDisposed); 1438Assert.False(control.IsDisposed); 1467Assert.Equal(callCount > 0, control.IsDisposed); 1487Assert.True(control.IsDisposed); 1489Assert.True(child1.IsDisposed); 1491Assert.True(child2.IsDisposed); 1508Assert.True(control.IsDisposed); 1510Assert.True(child1.IsDisposed); 1512Assert.True(child2.IsDisposed); 1555Assert.False(control.IsDisposed); 1557Assert.False(child1.IsDisposed); 1559Assert.False(child2.IsDisposed); 1576Assert.False(control.IsDisposed); 1578Assert.False(child1.IsDisposed); 1580Assert.False(child2.IsDisposed); 1608Assert.Equal(callCount > 0, control.IsDisposed); 1620Assert.True(control.IsDisposed); 1630Assert.True(control.IsDisposed); 1658Assert.False(control.IsDisposed); 1668Assert.False(control.IsDisposed); 1701Assert.Equal(callCount > 0, control.IsDisposed); 1713Assert.True(control.IsDisposed); 1727Assert.True(control.IsDisposed); 1766Assert.False(control.IsDisposed); 1780Assert.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);