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)
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); 1373public bool Created => GetState(States.Created); 1422if (!_state.HasFlag(States.TopLevel)) 1434if (_state.HasFlag(States.TabStop)) 1439if (_state.HasFlag(States.Visible)) 1506get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1507set => SetState(States.ValidationCancelled, value); 1558if (GetState(States.UseWaitCursor)) 1754public bool IsDisposed => GetState(States.Disposed); 1776public bool Disposing => GetState(States.Disposing); 1849return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1854SetState(States.Enabled, value); 2145if (GetState(States.Disposing | States.Disposed)) 2259if (!GetState(States.CheckedHost)) 2264SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2270SetState(States.HostedInDialog, false); 2286SetState(States.HostedInDialog, true); 2295SetState(States.CheckedHost, true); 2298return GetState(States.HostedInDialog); 2421get => GetState(States.IsAccessible); 2422set => SetState(States.IsAccessible, value); 2471SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2474return GetState(States.Mirrored); 2771public bool RecreatingHandle => GetState(States.Recreate); 3178get => (_state & States.TabStop) != 0; 3183SetState(States.TabStop, value); 3447get => GetState(States.UseWaitCursor); 3450if (GetState(States.UseWaitCursor) != value) 3452SetState(States.UseWaitCursor, value); 3852SetState(States.LayoutIsDirty, true); 3858if (GetState(States.LayoutIsDirty)) 4317SetState(States.CheckedHost, false); 4563ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4565if (GetState(States.CreatingHandle)) 4574SetState(States.CreatingHandle, true); 4583SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4617SetState(States.CreatingHandle, false); 4660if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4665SetState(States.Created, true); 4697SetState(States.Created, false); 4735SetState(States.ThreadMarshalPending, true); 4779if (GetState(States.OwnCtlBrush)) 4802if (GetState(States.Disposing)) 4807if (GetState(States.CreatingHandle)) 4815SetState(States.Disposing, true); 4851SetState(States.Disposing, false); 4852SetState(States.Disposed, true); 5150protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5381if (!GetState(States.TopLevel) && !( 5443internal bool DesiredVisibility => GetState(States.Visible); 5811private protected bool GetState(States flag) => (_state & flag) != 0; 5837if (!GetState(States.TrackingMouseEvent)) 5839SetState(States.TrackingMouseEvent, true); 6677if (GetState(States.OwnCtlBrush)) 7053if (GetState(States.Enabled)) 7097SetState(States.ParentRecreating, false); 7112SetState(States.ParentRecreating, true); 7425if (GetState(States.ThreadMarshalPending)) 7428SetState(States.ThreadMarshalPending, false); 7542if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7780ParentInternal.SetState(States.LayoutIsDirty, true); 8053|| GetState(States.ExceptionWhilePainting)) 8347if (GetState(States.ExceptionWhilePainting)) 8382SetState(States.ExceptionWhilePainting, true); 8454SetState(States.LayoutDeferred, true); 8483SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8489if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9242bool created = GetState(States.Created); 9244if (GetState(States.TrackingMouseEvent)) 9246SetState(States.MouseEnterPending, true); 9253SetState(States.Recreate, true); 9303SetState(States.Created, false); 9310SetState(States.Recreate, false); 9476if (GetState(States.TrackingMouseEvent)) 9525if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9564if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9595SetState(States.DropTarget, accept); 10184if (!GetState(States.SizeLockedByOS)) 10260SetState(States.Created, false); 10339private protected void SetState(States flag, bool value) 10402SetState(States.TopLevel, value); 10451SetState(States.Visible, value); 10472SetState(States.Visible, !value); 10479SetState(States.Visible, value); 10514SetState(States.Visible, value); 10596private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10842SetState(States.TrackingMouseEvent, false); 11047_state |= States.NoZOrder; 11058_state &= ~States.NoZOrder; 11096if ((_state & States.Visible) != 0) 11109SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11436if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11457SetState(States.Created, false); 11462SetState(States.Visible, false); 11501SetState(States.MousePressed, true); 11691&& GetState(States.MousePressed) 11697if (!GetState(States.DoubleClickFired)) 11715SetState(States.DoubleClickFired, false); 11716SetState(States.MousePressed, false); 11717SetState(States.ValidationCancelled, false); 12099if (_state.HasFlag(States.Recreate)) 12109bool oldVisibleBit = GetState(States.Visible); 12110SetState(States.Visible, true); 12124SetState(States.Visible, oldVisibleBit); 12143SetState(States.Visible, false); 12147if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12258&& (_state & States.NoZOrder) == 0) 12478SetState(States.DoubleClickFired, true); 12495SetState(States.DoubleClickFired, true); 12520SetState(States.DoubleClickFired, true); 12571SetState(States.DoubleClickFired, true); 12714bool 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)
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)
3211if (m.LParamInternal == Handle && !GetState(States.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4671get { 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)
207SetState(States.Visible, false); 208SetState(States.TopLevel, true); 808SetState(States.SizeLockedByOS, true); 1464bool oldVisibleBit = GetState(States.Visible); 1494SetState(States.TopLevel, false); 1555public bool Modal => GetState(States.Modal); 2200SetState(States.Visible, false); 2207SetState(States.Visible, true); 2559SetState(States.SizeLockedByOS, false); 2563SetState(States.SizeLockedByOS, true); 3258if (GetState(States.CreatingHandle)) 3843return GetState(States.Visible) && IsHandleCreated; 4308if (GetState(States.Modal)) 5740SetState(States.Modal, true); 5826SetState(States.Modal, false); 6075if (GetState(States.Modal)) 6600SetState(States.SizeLockedByOS, false); 6604SetState(States.SizeLockedByOS, true); 7008if (!GetState(States.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
104SetState(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);