171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
431else if (containingControl.Visible && !GetState(States.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE) 1026SetState(States.Visible, false); 1535if (GetState(States.Visible) == value) 1589SetState(States.Visible, value); 3146bool visible = GetState(States.Visible); 3151if (visible != GetState(States.Visible)) 3153SetState(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)
256private States _state; 319_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 533get => GetState(States.AllowDrop); 536if (GetState(States.AllowDrop) == value) 541SetState(States.AllowDrop, value); 555SetState(States.AllowDrop, !value); 701SetState(States.OwnCtlBrush, false); 706SetState(States.OwnCtlBrush, true); 1082get => GetState(States.CausesValidation); 1087SetState(States.CausesValidation, value); 1279public bool Created => GetState(States.Created); 1328if (!_state.HasFlag(States.TopLevel)) 1340if (_state.HasFlag(States.TabStop)) 1345if (_state.HasFlag(States.Visible)) 1412get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1413set => SetState(States.ValidationCancelled, value); 1464if (GetState(States.UseWaitCursor)) 1660public bool IsDisposed => GetState(States.Disposed); 1682public bool Disposing => GetState(States.Disposing); 1755return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1760SetState(States.Enabled, value); 2051if (GetState(States.Disposing | States.Disposed)) 2165if (!GetState(States.CheckedHost)) 2170SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2176SetState(States.HostedInDialog, false); 2192SetState(States.HostedInDialog, true); 2201SetState(States.CheckedHost, true); 2204return GetState(States.HostedInDialog); 2327get => GetState(States.IsAccessible); 2328set => SetState(States.IsAccessible, value); 2377SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2380return GetState(States.Mirrored); 2677public bool RecreatingHandle => GetState(States.Recreate); 3084get => (_state & States.TabStop) != 0; 3089SetState(States.TabStop, value); 3353get => GetState(States.UseWaitCursor); 3356if (GetState(States.UseWaitCursor) != value) 3358SetState(States.UseWaitCursor, value); 3758SetState(States.LayoutIsDirty, true); 3764if (GetState(States.LayoutIsDirty)) 4223SetState(States.CheckedHost, false); 4469ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4471if (GetState(States.CreatingHandle)) 4480SetState(States.CreatingHandle, true); 4489SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4523SetState(States.CreatingHandle, false); 4566if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4571SetState(States.Created, true); 4603SetState(States.Created, false); 4641SetState(States.ThreadMarshalPending, true); 4685if (GetState(States.OwnCtlBrush)) 4708if (GetState(States.Disposing)) 4713if (GetState(States.CreatingHandle)) 4721SetState(States.Disposing, true); 4757SetState(States.Disposing, false); 4758SetState(States.Disposed, true); 5056protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5287if (!GetState(States.TopLevel) && !( 5349internal bool DesiredVisibility => GetState(States.Visible); 5717private protected bool GetState(States flag) => (_state & flag) != 0; 5743if (!GetState(States.TrackingMouseEvent)) 5745SetState(States.TrackingMouseEvent, true); 6583if (GetState(States.OwnCtlBrush)) 6959if (GetState(States.Enabled)) 7006SetState(States.ParentRecreating, false); 7021SetState(States.ParentRecreating, true); 7332if (GetState(States.ThreadMarshalPending)) 7335SetState(States.ThreadMarshalPending, false); 7448if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7689ParentInternal.SetState(States.LayoutIsDirty, true); 7962|| GetState(States.ExceptionWhilePainting)) 8265if (GetState(States.ExceptionWhilePainting)) 8300SetState(States.ExceptionWhilePainting, true); 8372SetState(States.LayoutDeferred, true); 8401SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8407if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9158bool created = GetState(States.Created); 9159if (GetState(States.TrackingMouseEvent)) 9161SetState(States.MouseEnterPending, true); 9168SetState(States.Recreate, true); 9216SetState(States.Created, false); 9223SetState(States.Recreate, false); 9373if (GetState(States.TrackingMouseEvent)) 9422if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9461if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9492SetState(States.DropTarget, accept); 10084if (!GetState(States.SizeLockedByOS)) 10160SetState(States.Created, false); 10239private protected void SetState(States flag, bool value) 10287SetState(States.TopLevel, value); 10335SetState(States.Visible, value); 10356SetState(States.Visible, !value); 10363SetState(States.Visible, value); 10398SetState(States.Visible, value); 10480private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10726SetState(States.TrackingMouseEvent, false); 10931_state |= States.NoZOrder; 10942_state &= ~States.NoZOrder; 10980if ((_state & States.Visible) != 0) 10993SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11320if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11341SetState(States.Created, false); 11346SetState(States.Visible, false); 11385SetState(States.MousePressed, true); 11578&& GetState(States.MousePressed) 11584if (!GetState(States.DoubleClickFired)) 11602SetState(States.DoubleClickFired, false); 11603SetState(States.MousePressed, false); 11604SetState(States.ValidationCancelled, false); 11986if (_state.HasFlag(States.Recreate)) 11996bool oldVisibleBit = GetState(States.Visible); 11997SetState(States.Visible, true); 12011SetState(States.Visible, oldVisibleBit); 12030SetState(States.Visible, false); 12034if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12145&& (_state & States.NoZOrder) == 0) 12365SetState(States.DoubleClickFired, true); 12382SetState(States.DoubleClickFired, true); 12407SetState(States.DoubleClickFired, true); 12458SetState(States.DoubleClickFired, true); 12601bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16852if (GetState(States.Visible))
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
718if (RecreatingHandle || GetState(States.CreatingHandle)) 2449if (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)
3230if (m.LParamInternal == Handle && !GetState(States.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4662get { return GetState(States.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1086SetState(States.Visible, false); 1091SetState(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); 811SetState(States.SizeLockedByOS, true); 1470bool oldVisibleBit = GetState(States.Visible); 1500SetState(States.TopLevel, false); 1561public bool Modal => GetState(States.Modal); 2122SetState(States.Visible, false); 2129SetState(States.Visible, true); 2481SetState(States.SizeLockedByOS, false); 2485SetState(States.SizeLockedByOS, true); 3183if (GetState(States.CreatingHandle)) 3777return GetState(States.Visible) && IsHandleCreated; 4246if (GetState(States.Modal)) 5625SetState(States.Modal, true); 5711SetState(States.Modal, false); 5959if (GetState(States.Modal)) 6476SetState(States.SizeLockedByOS, false); 6480SetState(States.SizeLockedByOS, true); 6887if (!GetState(States.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
106SetState(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);