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)
254private States _state; 317_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 531get => GetState(States.AllowDrop); 534if (GetState(States.AllowDrop) == value) 539SetState(States.AllowDrop, value); 553SetState(States.AllowDrop, !value); 699SetState(States.OwnCtlBrush, false); 704SetState(States.OwnCtlBrush, true); 1080get => GetState(States.CausesValidation); 1085SetState(States.CausesValidation, value); 1277public bool Created => GetState(States.Created); 1326if (!_state.HasFlag(States.TopLevel)) 1338if (_state.HasFlag(States.TabStop)) 1343if (_state.HasFlag(States.Visible)) 1410get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1411set => SetState(States.ValidationCancelled, value); 1462if (GetState(States.UseWaitCursor)) 1658public bool IsDisposed => GetState(States.Disposed); 1680public bool Disposing => GetState(States.Disposing); 1753return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1758SetState(States.Enabled, value); 2049if (GetState(States.Disposing | States.Disposed)) 2163if (!GetState(States.CheckedHost)) 2168SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2174SetState(States.HostedInDialog, false); 2190SetState(States.HostedInDialog, true); 2199SetState(States.CheckedHost, true); 2202return GetState(States.HostedInDialog); 2325get => GetState(States.IsAccessible); 2326set => SetState(States.IsAccessible, value); 2375SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2378return GetState(States.Mirrored); 2675public bool RecreatingHandle => GetState(States.Recreate); 3082get => (_state & States.TabStop) != 0; 3087SetState(States.TabStop, value); 3351get => GetState(States.UseWaitCursor); 3354if (GetState(States.UseWaitCursor) != value) 3356SetState(States.UseWaitCursor, value); 3756SetState(States.LayoutIsDirty, true); 3762if (GetState(States.LayoutIsDirty)) 4221SetState(States.CheckedHost, false); 4467ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4469if (GetState(States.CreatingHandle)) 4478SetState(States.CreatingHandle, true); 4487SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4521SetState(States.CreatingHandle, false); 4564if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4569SetState(States.Created, true); 4601SetState(States.Created, false); 4639SetState(States.ThreadMarshalPending, true); 4683if (GetState(States.OwnCtlBrush)) 4706if (GetState(States.Disposing)) 4711if (GetState(States.CreatingHandle)) 4719SetState(States.Disposing, true); 4755SetState(States.Disposing, false); 4756SetState(States.Disposed, true); 5054protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5285if (!GetState(States.TopLevel) && !( 5347internal bool DesiredVisibility => GetState(States.Visible); 5715private protected bool GetState(States flag) => (_state & flag) != 0; 5741if (!GetState(States.TrackingMouseEvent)) 5743SetState(States.TrackingMouseEvent, true); 6581if (GetState(States.OwnCtlBrush)) 6957if (GetState(States.Enabled)) 7001SetState(States.ParentRecreating, false); 7016SetState(States.ParentRecreating, true); 7327if (GetState(States.ThreadMarshalPending)) 7330SetState(States.ThreadMarshalPending, false); 7443if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7681ParentInternal.SetState(States.LayoutIsDirty, true); 7954|| GetState(States.ExceptionWhilePainting)) 8257if (GetState(States.ExceptionWhilePainting)) 8292SetState(States.ExceptionWhilePainting, true); 8364SetState(States.LayoutDeferred, true); 8393SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8399if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9150bool created = GetState(States.Created); 9151if (GetState(States.TrackingMouseEvent)) 9153SetState(States.MouseEnterPending, true); 9160SetState(States.Recreate, true); 9208SetState(States.Created, false); 9215SetState(States.Recreate, false); 9365if (GetState(States.TrackingMouseEvent)) 9414if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9453if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9484SetState(States.DropTarget, accept); 10073if (!GetState(States.SizeLockedByOS)) 10149SetState(States.Created, false); 10228private protected void SetState(States flag, bool value) 10276SetState(States.TopLevel, value); 10324SetState(States.Visible, value); 10345SetState(States.Visible, !value); 10352SetState(States.Visible, value); 10387SetState(States.Visible, value); 10469private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10715SetState(States.TrackingMouseEvent, false); 10920_state |= States.NoZOrder; 10931_state &= ~States.NoZOrder; 10969if ((_state & States.Visible) != 0) 10982SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11309if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11330SetState(States.Created, false); 11335SetState(States.Visible, false); 11374SetState(States.MousePressed, true); 11564&& GetState(States.MousePressed) 11570if (!GetState(States.DoubleClickFired)) 11588SetState(States.DoubleClickFired, false); 11589SetState(States.MousePressed, false); 11590SetState(States.ValidationCancelled, false); 11972if (_state.HasFlag(States.Recreate)) 11982bool oldVisibleBit = GetState(States.Visible); 11983SetState(States.Visible, true); 11997SetState(States.Visible, oldVisibleBit); 12016SetState(States.Visible, false); 12020if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12131&& (_state & States.NoZOrder) == 0) 12351SetState(States.DoubleClickFired, true); 12368SetState(States.DoubleClickFired, true); 12393SetState(States.DoubleClickFired, true); 12444SetState(States.DoubleClickFired, true); 12587bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16846if (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)
4664get { 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); 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); 3180if (GetState(States.CreatingHandle)) 3774return GetState(States.Visible) && IsHandleCreated; 4243if (GetState(States.Modal)) 5619SetState(States.Modal, true); 5705SetState(States.Modal, false); 5953if (GetState(States.Modal)) 6470SetState(States.SizeLockedByOS, false); 6474SetState(States.SizeLockedByOS, true); 6881if (!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);