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)
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); 1366public bool Created => GetState(States.Created); 1415if (!_state.HasFlag(States.TopLevel)) 1427if (_state.HasFlag(States.TabStop)) 1432if (_state.HasFlag(States.Visible)) 1499get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1500set => SetState(States.ValidationCancelled, value); 1551if (GetState(States.UseWaitCursor)) 1747public bool IsDisposed => GetState(States.Disposed); 1769public bool Disposing => GetState(States.Disposing); 1842return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1847SetState(States.Enabled, value); 2138if (GetState(States.Disposing | States.Disposed)) 2252if (!GetState(States.CheckedHost)) 2257SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2263SetState(States.HostedInDialog, false); 2279SetState(States.HostedInDialog, true); 2288SetState(States.CheckedHost, true); 2291return GetState(States.HostedInDialog); 2414get => GetState(States.IsAccessible); 2415set => SetState(States.IsAccessible, value); 2464SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2467return GetState(States.Mirrored); 2764public bool RecreatingHandle => GetState(States.Recreate); 3171get => (_state & States.TabStop) != 0; 3176SetState(States.TabStop, value); 3440get => GetState(States.UseWaitCursor); 3443if (GetState(States.UseWaitCursor) != value) 3445SetState(States.UseWaitCursor, value); 3845SetState(States.LayoutIsDirty, true); 3851if (GetState(States.LayoutIsDirty)) 4310SetState(States.CheckedHost, false); 4556ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4558if (GetState(States.CreatingHandle)) 4567SetState(States.CreatingHandle, true); 4576SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4610SetState(States.CreatingHandle, false); 4653if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4658SetState(States.Created, true); 4690SetState(States.Created, false); 4728SetState(States.ThreadMarshalPending, true); 4772if (GetState(States.OwnCtlBrush)) 4795if (GetState(States.Disposing)) 4800if (GetState(States.CreatingHandle)) 4808SetState(States.Disposing, true); 4844SetState(States.Disposing, false); 4845SetState(States.Disposed, true); 5143protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5374if (!GetState(States.TopLevel) && !( 5436internal bool DesiredVisibility => GetState(States.Visible); 5804private protected bool GetState(States flag) => (_state & flag) != 0; 5830if (!GetState(States.TrackingMouseEvent)) 5832SetState(States.TrackingMouseEvent, true); 6672if (GetState(States.OwnCtlBrush)) 7048if (GetState(States.Enabled)) 7092SetState(States.ParentRecreating, false); 7107SetState(States.ParentRecreating, true); 7418if (GetState(States.ThreadMarshalPending)) 7421SetState(States.ThreadMarshalPending, false); 7535if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7773ParentInternal.SetState(States.LayoutIsDirty, true); 8046|| GetState(States.ExceptionWhilePainting)) 8340if (GetState(States.ExceptionWhilePainting)) 8375SetState(States.ExceptionWhilePainting, true); 8447SetState(States.LayoutDeferred, true); 8476SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8482if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9235bool created = GetState(States.Created); 9237if (GetState(States.TrackingMouseEvent)) 9239SetState(States.MouseEnterPending, true); 9246SetState(States.Recreate, true); 9296SetState(States.Created, false); 9303SetState(States.Recreate, false); 9468if (GetState(States.TrackingMouseEvent)) 9517if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9556if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9587SetState(States.DropTarget, accept); 10176if (!GetState(States.SizeLockedByOS)) 10252SetState(States.Created, false); 10331private protected void SetState(States flag, bool value) 10393SetState(States.TopLevel, value); 10441SetState(States.Visible, value); 10462SetState(States.Visible, !value); 10469SetState(States.Visible, value); 10504SetState(States.Visible, value); 10586private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10832SetState(States.TrackingMouseEvent, false); 11037_state |= States.NoZOrder; 11048_state &= ~States.NoZOrder; 11086if ((_state & States.Visible) != 0) 11099SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11426if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11447SetState(States.Created, false); 11452SetState(States.Visible, false); 11491SetState(States.MousePressed, true); 11681&& GetState(States.MousePressed) 11687if (!GetState(States.DoubleClickFired)) 11705SetState(States.DoubleClickFired, false); 11706SetState(States.MousePressed, false); 11707SetState(States.ValidationCancelled, false); 12089if (_state.HasFlag(States.Recreate)) 12099bool oldVisibleBit = GetState(States.Visible); 12100SetState(States.Visible, true); 12114SetState(States.Visible, oldVisibleBit); 12133SetState(States.Visible, false); 12137if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12248&& (_state & States.NoZOrder) == 0) 12468SetState(States.DoubleClickFired, true); 12485SetState(States.DoubleClickFired, true); 12510SetState(States.DoubleClickFired, true); 12561SetState(States.DoubleClickFired, true); 12704bool 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)
716if (RecreatingHandle || GetState(States.CreatingHandle)) 2447if (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)
4665get { 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); 807SetState(States.SizeLockedByOS, true); 1463bool oldVisibleBit = GetState(States.Visible); 1493SetState(States.TopLevel, false); 1554public bool Modal => GetState(States.Modal); 2199SetState(States.Visible, false); 2206SetState(States.Visible, true); 2548SetState(States.SizeLockedByOS, false); 2552SetState(States.SizeLockedByOS, true); 3243if (GetState(States.CreatingHandle)) 3828return GetState(States.Visible) && IsHandleCreated; 4293if (GetState(States.Modal)) 5723SetState(States.Modal, true); 5809SetState(States.Modal, false); 6058if (GetState(States.Modal)) 6582SetState(States.SizeLockedByOS, false); 6586SetState(States.SizeLockedByOS, true); 6990if (!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);