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; 330_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 606get => GetState(States.AllowDrop); 609if (GetState(States.AllowDrop) == value) 614SetState(States.AllowDrop, value); 628SetState(States.AllowDrop, !value); 774SetState(States.OwnCtlBrush, false); 779SetState(States.OwnCtlBrush, true); 1155get => GetState(States.CausesValidation); 1160SetState(States.CausesValidation, value); 1352public bool Created => GetState(States.Created); 1401if (!_state.HasFlag(States.TopLevel)) 1413if (_state.HasFlag(States.TabStop)) 1418if (_state.HasFlag(States.Visible)) 1485get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1486set => SetState(States.ValidationCancelled, value); 1537if (GetState(States.UseWaitCursor)) 1733public bool IsDisposed => GetState(States.Disposed); 1755public bool Disposing => GetState(States.Disposing); 1828return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1833SetState(States.Enabled, value); 2124if (GetState(States.Disposing | States.Disposed)) 2238if (!GetState(States.CheckedHost)) 2243SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2249SetState(States.HostedInDialog, false); 2265SetState(States.HostedInDialog, true); 2274SetState(States.CheckedHost, true); 2277return GetState(States.HostedInDialog); 2400get => GetState(States.IsAccessible); 2401set => SetState(States.IsAccessible, value); 2450SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2453return GetState(States.Mirrored); 2750public bool RecreatingHandle => GetState(States.Recreate); 3157get => (_state & States.TabStop) != 0; 3162SetState(States.TabStop, value); 3426get => GetState(States.UseWaitCursor); 3429if (GetState(States.UseWaitCursor) != value) 3431SetState(States.UseWaitCursor, value); 3831SetState(States.LayoutIsDirty, true); 3837if (GetState(States.LayoutIsDirty)) 4296SetState(States.CheckedHost, false); 4542ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4544if (GetState(States.CreatingHandle)) 4553SetState(States.CreatingHandle, true); 4562SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4596SetState(States.CreatingHandle, false); 4639if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4644SetState(States.Created, true); 4676SetState(States.Created, false); 4714SetState(States.ThreadMarshalPending, true); 4758if (GetState(States.OwnCtlBrush)) 4781if (GetState(States.Disposing)) 4786if (GetState(States.CreatingHandle)) 4794SetState(States.Disposing, true); 4830SetState(States.Disposing, false); 4831SetState(States.Disposed, true); 5129protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5360if (!GetState(States.TopLevel) && !( 5422internal bool DesiredVisibility => GetState(States.Visible); 5790private protected bool GetState(States flag) => (_state & flag) != 0; 5816if (!GetState(States.TrackingMouseEvent)) 5818SetState(States.TrackingMouseEvent, true); 6656if (GetState(States.OwnCtlBrush)) 7032if (GetState(States.Enabled)) 7076SetState(States.ParentRecreating, false); 7091SetState(States.ParentRecreating, true); 7404if (GetState(States.ThreadMarshalPending)) 7407SetState(States.ThreadMarshalPending, false); 7521if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7759ParentInternal.SetState(States.LayoutIsDirty, true); 8032|| GetState(States.ExceptionWhilePainting)) 8326if (GetState(States.ExceptionWhilePainting)) 8361SetState(States.ExceptionWhilePainting, true); 8433SetState(States.LayoutDeferred, true); 8462SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8468if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9221bool created = GetState(States.Created); 9223if (GetState(States.TrackingMouseEvent)) 9225SetState(States.MouseEnterPending, true); 9232SetState(States.Recreate, true); 9282SetState(States.Created, false); 9289SetState(States.Recreate, false); 9455if (GetState(States.TrackingMouseEvent)) 9504if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9543if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9574SetState(States.DropTarget, accept); 10163if (!GetState(States.SizeLockedByOS)) 10239SetState(States.Created, false); 10318private protected void SetState(States flag, bool value) 10381SetState(States.TopLevel, value); 10430SetState(States.Visible, value); 10451SetState(States.Visible, !value); 10458SetState(States.Visible, value); 10493SetState(States.Visible, value); 10575private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10821SetState(States.TrackingMouseEvent, false); 11026_state |= States.NoZOrder; 11037_state &= ~States.NoZOrder; 11075if ((_state & States.Visible) != 0) 11088SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11415if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11436SetState(States.Created, false); 11441SetState(States.Visible, false); 11480SetState(States.MousePressed, true); 11670&& GetState(States.MousePressed) 11676if (!GetState(States.DoubleClickFired)) 11694SetState(States.DoubleClickFired, false); 11695SetState(States.MousePressed, false); 11696SetState(States.ValidationCancelled, false); 12078if (_state.HasFlag(States.Recreate)) 12088bool oldVisibleBit = GetState(States.Visible); 12089SetState(States.Visible, true); 12103SetState(States.Visible, oldVisibleBit); 12122SetState(States.Visible, false); 12126if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12237&& (_state & States.NoZOrder) == 0) 12457SetState(States.DoubleClickFired, true); 12474SetState(States.DoubleClickFired, true); 12499SetState(States.DoubleClickFired, true); 12550SetState(States.DoubleClickFired, true); 12693bool 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)
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); 1467bool oldVisibleBit = GetState(States.Visible); 1497SetState(States.TopLevel, false); 1558public 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)) 3852return GetState(States.Visible) && IsHandleCreated; 4312if (GetState(States.Modal)) 5716SetState(States.Modal, true); 5802SetState(States.Modal, false); 6050if (GetState(States.Modal)) 6567SetState(States.SizeLockedByOS, false); 6571SetState(States.SizeLockedByOS, true); 6978if (!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);