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)
87if (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)) 7004SetState(States.ParentRecreating, false); 7019SetState(States.ParentRecreating, true); 7330if (GetState(States.ThreadMarshalPending)) 7333SetState(States.ThreadMarshalPending, false); 7446if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7687ParentInternal.SetState(States.LayoutIsDirty, true); 7960|| GetState(States.ExceptionWhilePainting)) 8263if (GetState(States.ExceptionWhilePainting)) 8298SetState(States.ExceptionWhilePainting, true); 8370SetState(States.LayoutDeferred, true); 8399SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8405if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9156bool created = GetState(States.Created); 9157if (GetState(States.TrackingMouseEvent)) 9159SetState(States.MouseEnterPending, true); 9166SetState(States.Recreate, true); 9214SetState(States.Created, false); 9221SetState(States.Recreate, false); 9371if (GetState(States.TrackingMouseEvent)) 9420if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9459if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9490SetState(States.DropTarget, accept); 10082if (!GetState(States.SizeLockedByOS)) 10158SetState(States.Created, false); 10237private protected void SetState(States flag, bool value) 10285SetState(States.TopLevel, value); 10333SetState(States.Visible, value); 10354SetState(States.Visible, !value); 10361SetState(States.Visible, value); 10396SetState(States.Visible, value); 10478private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10724SetState(States.TrackingMouseEvent, false); 10929_state |= States.NoZOrder; 10940_state &= ~States.NoZOrder; 10978if ((_state & States.Visible) != 0) 10991SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11318if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11339SetState(States.Created, false); 11344SetState(States.Visible, false); 11383SetState(States.MousePressed, true); 11576&& GetState(States.MousePressed) 11582if (!GetState(States.DoubleClickFired)) 11600SetState(States.DoubleClickFired, false); 11601SetState(States.MousePressed, false); 11602SetState(States.ValidationCancelled, false); 11984if (_state.HasFlag(States.Recreate)) 11994bool oldVisibleBit = GetState(States.Visible); 11995SetState(States.Visible, true); 12009SetState(States.Visible, oldVisibleBit); 12028SetState(States.Visible, false); 12032if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12143&& (_state & States.NoZOrder) == 0) 12363SetState(States.DoubleClickFired, true); 12380SetState(States.DoubleClickFired, true); 12405SetState(States.DoubleClickFired, true); 12456SetState(States.DoubleClickFired, true); 12599bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16851if (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);