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); 1355get => GetState(States.CausesValidation); 1360SetState(States.CausesValidation, value); 1545public bool Created => GetState(States.Created); 1594if (!_state.HasFlag(States.TopLevel)) 1606if (_state.HasFlag(States.TabStop)) 1611if (_state.HasFlag(States.Visible)) 1678get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1679set => SetState(States.ValidationCancelled, value); 1730if (GetState(States.UseWaitCursor)) 1926public bool IsDisposed => GetState(States.Disposed); 1948public bool Disposing => GetState(States.Disposing); 2021return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 2026SetState(States.Enabled, value); 2317if (GetState(States.Disposing | States.Disposed)) 2431if (!GetState(States.CheckedHost)) 2436SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2442SetState(States.HostedInDialog, false); 2458SetState(States.HostedInDialog, true); 2467SetState(States.CheckedHost, true); 2470return GetState(States.HostedInDialog); 2593get => GetState(States.IsAccessible); 2594set => SetState(States.IsAccessible, value); 2643SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2646return GetState(States.Mirrored); 2943public bool RecreatingHandle => GetState(States.Recreate); 3350get => (_state & States.TabStop) != 0; 3355SetState(States.TabStop, value); 3619get => GetState(States.UseWaitCursor); 3622if (GetState(States.UseWaitCursor) != value) 3624SetState(States.UseWaitCursor, value); 4037SetState(States.LayoutIsDirty, true); 4043if (GetState(States.LayoutIsDirty)) 4526SetState(States.CheckedHost, false); 4771ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4773if (GetState(States.CreatingHandle)) 4782SetState(States.CreatingHandle, true); 4791SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4825SetState(States.CreatingHandle, false); 4868if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4873SetState(States.Created, true); 4905SetState(States.Created, false); 4943SetState(States.ThreadMarshalPending, true); 4987if (GetState(States.OwnCtlBrush)) 5010if (GetState(States.Disposing)) 5015if (GetState(States.CreatingHandle)) 5023SetState(States.Disposing, true); 5059SetState(States.Disposing, false); 5060SetState(States.Disposed, true); 5366protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5598if (!GetState(States.TopLevel) && !( 5660internal bool DesiredVisibility => GetState(States.Visible); 6028private protected bool GetState(States flag) => (_state & flag) != 0; 6054if (!GetState(States.TrackingMouseEvent)) 6056SetState(States.TrackingMouseEvent, true); 6896if (GetState(States.OwnCtlBrush)) 7647if (GetState(States.Enabled)) 7691SetState(States.ParentRecreating, false); 7706SetState(States.ParentRecreating, true); 8024if (GetState(States.ThreadMarshalPending)) 8027SetState(States.ThreadMarshalPending, false); 8145if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 8383ParentInternal.SetState(States.LayoutIsDirty, true); 8656|| GetState(States.ExceptionWhilePainting)) 9071if (GetState(States.ExceptionWhilePainting)) 9106SetState(States.ExceptionWhilePainting, true); 9178SetState(States.LayoutDeferred, true); 9207SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 9213if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9966bool created = GetState(States.Created); 9968if (GetState(States.TrackingMouseEvent)) 9970SetState(States.MouseEnterPending, true); 9977SetState(States.Recreate, true); 10027SetState(States.Created, false); 10034SetState(States.Recreate, false); 10199if (GetState(States.TrackingMouseEvent)) 10248if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 10287if (accept == GetState(States.DropTarget) || !IsHandleCreated) 10318SetState(States.DropTarget, accept); 10907if (!GetState(States.SizeLockedByOS)) 10983SetState(States.Created, false); 11062private protected void SetState(States flag, bool value) 11124SetState(States.TopLevel, value); 11172SetState(States.Visible, value); 11193SetState(States.Visible, !value); 11200SetState(States.Visible, value); 11235SetState(States.Visible, value); 11317private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 11563SetState(States.TrackingMouseEvent, false); 11768_state |= States.NoZOrder; 11779_state &= ~States.NoZOrder; 11817if ((_state & States.Visible) != 0) 11830SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 12157if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 12178SetState(States.Created, false); 12183SetState(States.Visible, false); 12222SetState(States.MousePressed, true); 12416&& GetState(States.MousePressed) 12422if (!GetState(States.DoubleClickFired)) 12440SetState(States.DoubleClickFired, false); 12441SetState(States.MousePressed, false); 12442SetState(States.ValidationCancelled, false); 12824if (_state.HasFlag(States.Recreate)) 12834bool oldVisibleBit = GetState(States.Visible); 12835SetState(States.Visible, true); 12849SetState(States.Visible, oldVisibleBit); 12868SetState(States.Visible, false); 12872if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12983&& (_state & States.NoZOrder) == 0) 13203SetState(States.DoubleClickFired, true); 13220SetState(States.DoubleClickFired, true); 13245SetState(States.DoubleClickFired, true); 13296SetState(States.DoubleClickFired, true); 13447bool 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)) 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)
4705get { 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)) 5739SetState(States.Modal, true); 5825SetState(States.Modal, false); 6074if (GetState(States.Modal)) 6598SetState(States.SizeLockedByOS, false); 6602SetState(States.SizeLockedByOS, true); 7006if (!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);