171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
430else if (containingControl.Visible && !GetState(States.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE) 1025SetState(States.Visible, false); 1534if (GetState(States.Visible) == value) 1588SetState(States.Visible, value); 3145bool visible = GetState(States.Visible); 3150if (visible != GetState(States.Visible)) 3152SetState(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)
255private States _state; 318_state = States.Visible | States.Enabled | States.TabStop | States.CausesValidation; 532get => GetState(States.AllowDrop); 535if (GetState(States.AllowDrop) == value) 540SetState(States.AllowDrop, value); 554SetState(States.AllowDrop, !value); 700SetState(States.OwnCtlBrush, false); 705SetState(States.OwnCtlBrush, true); 1081get => GetState(States.CausesValidation); 1086SetState(States.CausesValidation, value); 1278public bool Created => GetState(States.Created); 1327if (!_state.HasFlag(States.TopLevel)) 1339if (_state.HasFlag(States.TabStop)) 1344if (_state.HasFlag(States.Visible)) 1411get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1412set => SetState(States.ValidationCancelled, value); 1463if (GetState(States.UseWaitCursor)) 1659public bool IsDisposed => GetState(States.Disposed); 1681public bool Disposing => GetState(States.Disposing); 1754return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1759SetState(States.Enabled, value); 2050if (GetState(States.Disposing | States.Disposed)) 2164if (!GetState(States.CheckedHost)) 2169SetState(States.HostedInDialog, topMost.HostedInWin32DialogManager); 2175SetState(States.HostedInDialog, false); 2191SetState(States.HostedInDialog, true); 2200SetState(States.CheckedHost, true); 2203return GetState(States.HostedInDialog); 2326get => GetState(States.IsAccessible); 2327set => SetState(States.IsAccessible, value); 2376SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 2379return GetState(States.Mirrored); 2676public bool RecreatingHandle => GetState(States.Recreate); 3083get => (_state & States.TabStop) != 0; 3088SetState(States.TabStop, value); 3352get => GetState(States.UseWaitCursor); 3355if (GetState(States.UseWaitCursor) != value) 3357SetState(States.UseWaitCursor, value); 3757SetState(States.LayoutIsDirty, true); 3763if (GetState(States.LayoutIsDirty)) 4222SetState(States.CheckedHost, false); 4468ObjectDisposedException.ThrowIf(GetState(States.Disposed), this); 4470if (GetState(States.CreatingHandle)) 4479SetState(States.CreatingHandle, true); 4488SetState(States.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0); 4522SetState(States.CreatingHandle, false); 4565if (!ignoreVisible && (GetState(States.Created) || !Visible)) 4570SetState(States.Created, true); 4602SetState(States.Created, false); 4640SetState(States.ThreadMarshalPending, true); 4684if (GetState(States.OwnCtlBrush)) 4707if (GetState(States.Disposing)) 4712if (GetState(States.CreatingHandle)) 4720SetState(States.Disposing, true); 4756SetState(States.Disposing, false); 4757SetState(States.Disposed, true); 5015protected bool GetTopLevel() => (_state & States.TopLevel) != 0; 5246if (!GetState(States.TopLevel) && !( 5308internal bool DesiredVisibility => GetState(States.Visible); 5676private protected bool GetState(States flag) => (_state & flag) != 0; 5702if (!GetState(States.TrackingMouseEvent)) 5704SetState(States.TrackingMouseEvent, true); 6542if (GetState(States.OwnCtlBrush)) 6918if (GetState(States.Enabled)) 6965SetState(States.ParentRecreating, false); 6980SetState(States.ParentRecreating, true); 7291if (GetState(States.ThreadMarshalPending)) 7294SetState(States.ThreadMarshalPending, false); 7407if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7648ParentInternal.SetState(States.LayoutIsDirty, true); 7921|| GetState(States.ExceptionWhilePainting)) 8224if (GetState(States.ExceptionWhilePainting)) 8259SetState(States.ExceptionWhilePainting, true); 8331SetState(States.LayoutDeferred, true); 8360SetState(States.LayoutDeferred | States.LayoutIsDirty, false); 8366if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9117bool created = GetState(States.Created); 9118if (GetState(States.TrackingMouseEvent)) 9120SetState(States.MouseEnterPending, true); 9127SetState(States.Recreate, true); 9175SetState(States.Created, false); 9182SetState(States.Recreate, false); 9332if (GetState(States.TrackingMouseEvent)) 9381if (LayoutSuspendCount == 0 && GetState(States.LayoutDeferred) && performLayout) 9420if (accept == GetState(States.DropTarget) || !IsHandleCreated) 9451SetState(States.DropTarget, accept); 10051if (!GetState(States.SizeLockedByOS)) 10127SetState(States.Created, false); 10206private protected void SetState(States flag, bool value) 10254SetState(States.TopLevel, value); 10302SetState(States.Visible, value); 10323SetState(States.Visible, !value); 10330SetState(States.Visible, value); 10365SetState(States.Visible, value); 10447private bool ShouldSerializeEnabled() => !GetState(States.Enabled); 10693SetState(States.TrackingMouseEvent, false); 10898_state |= States.NoZOrder; 10909_state &= ~States.NoZOrder; 10947if ((_state & States.Visible) != 0) 10960SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11287if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(States.TrackingMouseEvent)) 11308SetState(States.Created, false); 11313SetState(States.Visible, false); 11352SetState(States.MousePressed, true); 11545&& GetState(States.MousePressed) 11551if (!GetState(States.DoubleClickFired)) 11569SetState(States.DoubleClickFired, false); 11570SetState(States.MousePressed, false); 11571SetState(States.ValidationCancelled, false); 11954if (_state.HasFlag(States.Recreate)) 11964bool oldVisibleBit = GetState(States.Visible); 11965SetState(States.Visible, true); 11979SetState(States.Visible, oldVisibleBit); 11998SetState(States.Visible, false); 12002if (!GetState(States.ParentRecreating) && (oldVisibleProperty != visible)) 12113&& (_state & States.NoZOrder) == 0) 12333SetState(States.DoubleClickFired, true); 12350SetState(States.DoubleClickFired, true); 12375SetState(States.DoubleClickFired, true); 12426SetState(States.DoubleClickFired, true); 12569bool IArrangedElement.ParticipatesInLayout => GetState(States.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16833if (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)
3219if (m.LParamInternal == Handle && !GetState(States.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4667get { return GetState(States.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1089SetState(States.Visible, false); 1094SetState(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);