171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
428else if (containingControl.Visible && !GetState(States.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE) 1023SetState(States.Visible, false); 1532if (GetState(States.Visible) == value) 1586SetState(States.Visible, value); 3143bool visible = GetState(States.Visible); 3148if (visible != GetState(States.Visible)) 3150SetState(States.Visible, visible);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
86if (GetState(States.TopLevel))
System\Windows\Forms\Application.ParkingWindow.cs (1)
26SetState(States.TopLevel, true);
System\Windows\Forms\Control.ControlCollection.cs (1)
106if (oldParent != value._parent && (Owner._state & States.Created) != 0)
System\Windows\Forms\Control.ControlNativeWindow.cs (3)
93if (!_control.GetState(States.TrackingMouseEvent)) 96if (!_control.GetState(States.MouseEnterPending)) 102_control.SetState(States.MouseEnterPending, false);
System\Windows\Forms\Control.cs (126)
258private States _state; 325_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 627get => GetState(States.AllowDrop); 630if (GetState(States.AllowDrop) == value) 635SetState(States.AllowDrop, value); 649SetState(States.AllowDrop, !value); 795SetState(States.OwnCtlBrush, false); 800SetState(States.OwnCtlBrush, true); 1176get => GetState(States.CausesValidation); 1181SetState(States.CausesValidation, value); 1366public bool Created => GetState(States.Created); 1415if (!_state.HasFlag(States.TopLevel)) 1427if (_state.HasFlag(States.TabStop)) 1432if (_state.HasFlag(States.Visible)) 1499get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1500set => SetState(States.ValidationCancelled, value); 1551if (GetState(States.UseWaitCursor)) 1747public bool IsDisposed => GetState(States.Disposed); 1769public bool Disposing => GetState(States.Disposing); 1842return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1847SetState(States.Enabled, value); 2138if (GetState(States.Disposing | States.Disposed)) 2252if (!GetState(States.CheckedHost)) 2257SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2263SetState(States.HostedInDialog, false); 2279SetState(States.HostedInDialog, true); 2288SetState(States.CheckedHost, true); 2291return GetState(States.HostedInDialog); 2414get => GetState(States.IsAccessible); 2415set => SetState(States.IsAccessible, value); 2464SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2467return GetState(States.Mirrored); 2764public bool RecreatingHandle => GetState(States.Recreate); 3171get => (_state & States.TabStop) != 0; 3176SetState(States.TabStop, value); 3440get => GetState(States.UseWaitCursor); 3443if (GetState(States.UseWaitCursor) != value) 3445SetState(States.UseWaitCursor, value); 3845SetState(States.LayoutIsDirty, true); 3851if (GetState(States.LayoutIsDirty)) 4310SetState(States.CheckedHost, false); 4556ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4558if (GetState(States.CreatingHandle)) 4567SetState(States.CreatingHandle, true); 4576SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4610SetState(States.CreatingHandle, false); 4653if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4658SetState(States.Created, true); 4690SetState(States.Created, false); 4728SetState(States.ThreadMarshalPending, true); 4772if (GetState(States.OwnCtlBrush)) 4795if (GetState(States.Disposing)) 4800if (GetState(States.CreatingHandle)) 4808SetState(States.Disposing, true); 4844SetState(States.Disposing, false); 4845SetState(States.Disposed, true); 5143protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5374if (!GetState(States.TopLevel) && !( 5436internal bool DesiredVisibility => GetState(States.Visible); 5804private protected bool GetState(States flag) => (_state & flag) != 0; 5830if (!GetState(States.TrackingMouseEvent)) 5832SetState(States.TrackingMouseEvent, true); 6672if (GetState(States.OwnCtlBrush)) 7048if (GetState(States.Enabled)) 7092SetState(States.ParentRecreating, false); 7107SetState(States.ParentRecreating, true); 7418if (GetState(States.ThreadMarshalPending)) 7421SetState(States.ThreadMarshalPending, false); 7537if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7775ParentInternal.SetState(States.LayoutIsDirty, true); 8048|| GetState(States.ExceptionWhilePainting)) 8342if (GetState(States.ExceptionWhilePainting)) 8377SetState(States.ExceptionWhilePainting, true); 8449SetState(States.LayoutDeferred, true); 8478SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8484if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9237bool created = GetState(States.Created); 9239if (GetState(States.TrackingMouseEvent)) 9241SetState(States.MouseEnterPending, true); 9248SetState(States.Recreate, true); 9298SetState(States.Created, false); 9305SetState(States.Recreate, false); 9470if (GetState(States.TrackingMouseEvent)) 9519if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9558if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9589SetState(States.DropTarget, accept); 10178if (!GetState(States.SizeLockedByOS)) 10254SetState(States.Created, false); 10333private protected void SetState(States flag, bool value) 10395SetState(States.TopLevel, value); 10443SetState(States.Visible, value); 10464SetState(States.Visible, !value); 10471SetState(States.Visible, value); 10506SetState(States.Visible, value); 10588private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10834SetState(States.TrackingMouseEvent, false); 11039_state |= States.NoZOrder; 11050_state &= ~States.NoZOrder; 11088if ((_state & States.Visible) != 0) 11101SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11428if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11449SetState(States.Created, false); 11454SetState(States.Visible, false); 11493SetState(States.MousePressed, true); 11683&& GetState(States.MousePressed) 11689if (!GetState(States.DoubleClickFired)) 11707SetState(States.DoubleClickFired, false); 11708SetState(States.MousePressed, false); 11709SetState(States.ValidationCancelled, false); 12091if (_state.HasFlag(States.Recreate)) 12101bool oldVisibleBit = GetState(States.Visible); 12102SetState(States.Visible, true); 12116SetState(States.Visible, oldVisibleBit); 12135SetState(States.Visible, false); 12139if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12250&& (_state & States.NoZOrder) == 0) 12470SetState(States.DoubleClickFired, true); 12487SetState(States.DoubleClickFired, true); 12512SetState(States.DoubleClickFired, true); 12563SetState(States.DoubleClickFired, true); 12706bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16843if (GetState(States.Visible))
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
716if (RecreatingHandle || GetState(States.CreatingHandle)) 2447if (GetState(States.Disposed))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
666SetState(States.Modal, true);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3211if (m.LParamInternal == Handle && !GetState(States.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4665get { return GetState(States.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1083SetState(States.Visible, false); 1088SetState(States.Modal, true);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
67get { return GetState(States.Visible); }
System\Windows\Forms\Form.cs (19)
206SetState(States.Visible, false); 207SetState(States.TopLevel, true); 807SetState(States.SizeLockedByOS, true); 1463bool oldVisibleBit = GetState(States.Visible); 1493SetState(States.TopLevel, false); 1554public bool Modal => GetState(States.Modal); 2199SetState(States.Visible, false); 2206SetState(States.Visible, true); 2548SetState(States.SizeLockedByOS, false); 2552SetState(States.SizeLockedByOS, true); 3243if (GetState(States.CreatingHandle)) 3828return GetState(States.Visible) && IsHandleCreated; 4293if (GetState(States.Modal)) 5723SetState(States.Modal, true); 5809SetState(States.Modal, false); 6058if (GetState(States.Modal)) 6582SetState(States.SizeLockedByOS, false); 6586SetState(States.SizeLockedByOS, true); 6990if (!GetState(States.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
102SetState(States.Enabled, false);
System\Windows\Forms\SendKeys\SendKeys.SKWindow.cs (1)
15SetState(States.TopLevel, true);
System\Windows\Forms\UserControl.cs (2)
32SetState(States.Visible, true); 33SetState(States.TopLevel, false);