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; 601get => GetState(States.AllowDrop); 604if (GetState(States.AllowDrop) == value) 609SetState(States.AllowDrop, value); 623SetState(States.AllowDrop, !value); 769SetState(States.OwnCtlBrush, false); 774SetState(States.OwnCtlBrush, true); 1150get => GetState(States.CausesValidation); 1155SetState(States.CausesValidation, value); 1347public bool Created => GetState(States.Created); 1396if (!_state.HasFlag(States.TopLevel)) 1408if (_state.HasFlag(States.TabStop)) 1413if (_state.HasFlag(States.Visible)) 1480get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1481set => SetState(States.ValidationCancelled, value); 1532if (GetState(States.UseWaitCursor)) 1728public bool IsDisposed => GetState(States.Disposed); 1750public bool Disposing => GetState(States.Disposing); 1823return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1828SetState(States.Enabled, value); 2119if (GetState(States.Disposing | States.Disposed)) 2233if (!GetState(States.CheckedHost)) 2238SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2244SetState(States.HostedInDialog, false); 2260SetState(States.HostedInDialog, true); 2269SetState(States.CheckedHost, true); 2272return GetState(States.HostedInDialog); 2395get => GetState(States.IsAccessible); 2396set => SetState(States.IsAccessible, value); 2445SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2448return GetState(States.Mirrored); 2745public bool RecreatingHandle => GetState(States.Recreate); 3152get => (_state & States.TabStop) != 0; 3157SetState(States.TabStop, value); 3421get => GetState(States.UseWaitCursor); 3424if (GetState(States.UseWaitCursor) != value) 3426SetState(States.UseWaitCursor, value); 3826SetState(States.LayoutIsDirty, true); 3832if (GetState(States.LayoutIsDirty)) 4291SetState(States.CheckedHost, false); 4537ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4539if (GetState(States.CreatingHandle)) 4548SetState(States.CreatingHandle, true); 4557SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4591SetState(States.CreatingHandle, false); 4634if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4639SetState(States.Created, true); 4671SetState(States.Created, false); 4709SetState(States.ThreadMarshalPending, true); 4753if (GetState(States.OwnCtlBrush)) 4776if (GetState(States.Disposing)) 4781if (GetState(States.CreatingHandle)) 4789SetState(States.Disposing, true); 4825SetState(States.Disposing, false); 4826SetState(States.Disposed, true); 5124protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5355if (!GetState(States.TopLevel) && !( 5417internal bool DesiredVisibility => GetState(States.Visible); 5785private protected bool GetState(States flag) => (_state & flag) != 0; 5811if (!GetState(States.TrackingMouseEvent)) 5813SetState(States.TrackingMouseEvent, true); 6651if (GetState(States.OwnCtlBrush)) 7027if (GetState(States.Enabled)) 7071SetState(States.ParentRecreating, false); 7086SetState(States.ParentRecreating, true); 7399if (GetState(States.ThreadMarshalPending)) 7402SetState(States.ThreadMarshalPending, false); 7516if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7754ParentInternal.SetState(States.LayoutIsDirty, true); 8027|| GetState(States.ExceptionWhilePainting)) 8321if (GetState(States.ExceptionWhilePainting)) 8356SetState(States.ExceptionWhilePainting, true); 8428SetState(States.LayoutDeferred, true); 8457SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8463if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9216bool created = GetState(States.Created); 9218if (GetState(States.TrackingMouseEvent)) 9220SetState(States.MouseEnterPending, true); 9227SetState(States.Recreate, true); 9277SetState(States.Created, false); 9284SetState(States.Recreate, false); 9450if (GetState(States.TrackingMouseEvent)) 9499if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9538if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9569SetState(States.DropTarget, accept); 10158if (!GetState(States.SizeLockedByOS)) 10234SetState(States.Created, false); 10313private protected void SetState(States flag, bool value) 10361SetState(States.TopLevel, value); 10409SetState(States.Visible, value); 10430SetState(States.Visible, !value); 10437SetState(States.Visible, value); 10472SetState(States.Visible, value); 10554private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10800SetState(States.TrackingMouseEvent, false); 11005_state |= States.NoZOrder; 11016_state &= ~States.NoZOrder; 11054if ((_state & States.Visible) != 0) 11067SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11394if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11415SetState(States.Created, false); 11420SetState(States.Visible, false); 11459SetState(States.MousePressed, true); 11649&& GetState(States.MousePressed) 11655if (!GetState(States.DoubleClickFired)) 11673SetState(States.DoubleClickFired, false); 11674SetState(States.MousePressed, false); 11675SetState(States.ValidationCancelled, false); 12057if (_state.HasFlag(States.Recreate)) 12067bool oldVisibleBit = GetState(States.Visible); 12068SetState(States.Visible, true); 12082SetState(States.Visible, oldVisibleBit); 12101SetState(States.Visible, false); 12105if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12216&& (_state & States.NoZOrder) == 0) 12436SetState(States.DoubleClickFired, true); 12453SetState(States.DoubleClickFired, true); 12478SetState(States.DoubleClickFired, true); 12529SetState(States.DoubleClickFired, true); 12672bool 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);