171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
428else if (containingControl.Visible && !GetState(States.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE) 1023SetState(States.Visible, false); 1532if (GetState(States.Visible) == value) 1586SetState(States.Visible, value); 3143bool visible = GetState(States.Visible); 3148if (visible != GetState(States.Visible)) 3150SetState(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)
269private States _state; 335_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 637get => GetState(States.AllowDrop); 640if (GetState(States.AllowDrop) == value) 645SetState(States.AllowDrop, value); 659SetState(States.AllowDrop, !value); 805SetState(States.OwnCtlBrush, false); 810SetState(States.OwnCtlBrush, true); 1364get => GetState(States.CausesValidation); 1369SetState(States.CausesValidation, value); 1554public bool Created => GetState(States.Created); 1603if (!_state.HasFlag(States.TopLevel)) 1615if (_state.HasFlag(States.TabStop)) 1620if (_state.HasFlag(States.Visible)) 1687get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1688set => SetState(States.ValidationCancelled, value); 1739if (GetState(States.UseWaitCursor)) 1935public bool IsDisposed => GetState(States.Disposed); 1957public bool Disposing => GetState(States.Disposing); 2030return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 2035SetState(States.Enabled, value); 2326if (GetState(States.Disposing | States.Disposed)) 2440if (!GetState(States.CheckedHost)) 2445SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2451SetState(States.HostedInDialog, false); 2467SetState(States.HostedInDialog, true); 2476SetState(States.CheckedHost, true); 2479return GetState(States.HostedInDialog); 2602get => GetState(States.IsAccessible); 2603set => SetState(States.IsAccessible, value); 2652SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2655return GetState(States.Mirrored); 2952public bool RecreatingHandle => GetState(States.Recreate); 3359get => (_state & States.TabStop) != 0; 3364SetState(States.TabStop, value); 3628get => GetState(States.UseWaitCursor); 3631if (GetState(States.UseWaitCursor) != value) 3633SetState(States.UseWaitCursor, value); 4046SetState(States.LayoutIsDirty, true); 4052if (GetState(States.LayoutIsDirty)) 4535SetState(States.CheckedHost, false); 4780ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4782if (GetState(States.CreatingHandle)) 4791SetState(States.CreatingHandle, true); 4800SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4834SetState(States.CreatingHandle, false); 4877if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4882SetState(States.Created, true); 4914SetState(States.Created, false); 4952SetState(States.ThreadMarshalPending, true); 4996if (GetState(States.OwnCtlBrush)) 5019if (GetState(States.Disposing)) 5024if (GetState(States.CreatingHandle)) 5032SetState(States.Disposing, true); 5068SetState(States.Disposing, false); 5069SetState(States.Disposed, true); 5375protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5607if (!GetState(States.TopLevel) && !( 5669internal bool DesiredVisibility => GetState(States.Visible); 6037private protected bool GetState(States flag) => (_state & flag) != 0; 6063if (!GetState(States.TrackingMouseEvent)) 6065SetState(States.TrackingMouseEvent, true); 6905if (GetState(States.OwnCtlBrush)) 7705if (GetState(States.Enabled)) 7749SetState(States.ParentRecreating, false); 7764SetState(States.ParentRecreating, true); 8082if (GetState(States.ThreadMarshalPending)) 8085SetState(States.ThreadMarshalPending, false); 8203if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 8441ParentInternal.SetState(States.LayoutIsDirty, true); 8714|| GetState(States.ExceptionWhilePainting)) 9129if (GetState(States.ExceptionWhilePainting)) 9164SetState(States.ExceptionWhilePainting, true); 9236SetState(States.LayoutDeferred, true); 9265SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 9271if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 10024bool created = GetState(States.Created); 10026if (GetState(States.TrackingMouseEvent)) 10028SetState(States.MouseEnterPending, true); 10035SetState(States.Recreate, true); 10085SetState(States.Created, false); 10092SetState(States.Recreate, false); 10257if (GetState(States.TrackingMouseEvent)) 10306if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 10345if (accept == GetState(States.DropTarget) || !IsHandleCreated) 10376SetState(States.DropTarget, accept); 10965if (!GetState(States.SizeLockedByOS)) 11041SetState(States.Created, false); 11120private protected void SetState(States flag, bool value) 11182SetState(States.TopLevel, value); 11230SetState(States.Visible, value); 11251SetState(States.Visible, !value); 11258SetState(States.Visible, value); 11293SetState(States.Visible, value); 11375private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 11621SetState(States.TrackingMouseEvent, false); 11826_state |= States.NoZOrder; 11837_state &= ~States.NoZOrder; 11875if ((_state & States.Visible) != 0) 11888SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 12215if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 12236SetState(States.Created, false); 12241SetState(States.Visible, false); 12280SetState(States.MousePressed, true); 12474&& GetState(States.MousePressed) 12480if (!GetState(States.DoubleClickFired)) 12498SetState(States.DoubleClickFired, false); 12499SetState(States.MousePressed, false); 12500SetState(States.ValidationCancelled, false); 12882if (_state.HasFlag(States.Recreate)) 12892bool oldVisibleBit = GetState(States.Visible); 12893SetState(States.Visible, true); 12907SetState(States.Visible, oldVisibleBit); 12926SetState(States.Visible, false); 12930if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 13041&& (_state & States.NoZOrder) == 0) 13261SetState(States.DoubleClickFired, true); 13278SetState(States.DoubleClickFired, true); 13303SetState(States.DoubleClickFired, true); 13354SetState(States.DoubleClickFired, true); 13505bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16908if (GetState(States.Visible))
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
716if (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)
3314if (m.LParamInternal == Handle && !GetState(States.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4710get { 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)
209SetState(States.Visible, false); 210SetState(States.TopLevel, true); 810SetState(States.SizeLockedByOS, true); 1466bool oldVisibleBit = GetState(States.Visible); 1496SetState(States.TopLevel, false); 1557public bool Modal => GetState(States.Modal); 2202SetState(States.Visible, false); 2209SetState(States.Visible, true); 2551SetState(States.SizeLockedByOS, false); 2555SetState(States.SizeLockedByOS, true); 3246if (GetState(States.CreatingHandle)) 3837return GetState(States.Visible) && IsHandleCreated; 4309if (GetState(States.Modal)) 5788SetState(States.Modal, true); 5874SetState(States.Modal, false); 6123if (GetState(States.Modal)) 6647SetState(States.SizeLockedByOS, false); 6651SetState(States.SizeLockedByOS, true); 7055if (!GetState(States.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
102SetState(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);