171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
428
else if (containingControl.Visible && !GetState(
States
.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE)
1023
SetState(
States
.Visible, false);
1532
if (GetState(
States
.Visible) == value)
1586
SetState(
States
.Visible, value);
3143
bool visible = GetState(
States
.Visible);
3148
if (visible != GetState(
States
.Visible))
3150
SetState(
States
.Visible, visible);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
86
if (GetState(
States
.TopLevel))
System\Windows\Forms\Application.ParkingWindow.cs (1)
26
SetState(
States
.TopLevel, true);
System\Windows\Forms\Control.ControlCollection.cs (1)
106
if (oldParent != value._parent && (Owner._state &
States
.Created) != 0)
System\Windows\Forms\Control.ControlNativeWindow.cs (3)
93
if (!_control.GetState(
States
.TrackingMouseEvent))
96
if (!_control.GetState(
States
.MouseEnterPending))
102
_control.SetState(
States
.MouseEnterPending, false);
System\Windows\Forms\Control.cs (126)
269
private
States
_state;
335
_state =
States
.Visible |
States
.Enabled |
States
.TabStop |
States
.CausesValidation;
637
get => GetState(
States
.AllowDrop);
640
if (GetState(
States
.AllowDrop) == value)
645
SetState(
States
.AllowDrop, value);
659
SetState(
States
.AllowDrop, !value);
805
SetState(
States
.OwnCtlBrush, false);
810
SetState(
States
.OwnCtlBrush, true);
1355
get => GetState(
States
.CausesValidation);
1360
SetState(
States
.CausesValidation, value);
1545
public bool Created => GetState(
States
.Created);
1594
if (!_state.HasFlag(
States
.TopLevel))
1606
if (_state.HasFlag(
States
.TabStop))
1611
if (_state.HasFlag(
States
.Visible))
1678
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1679
set => SetState(
States
.ValidationCancelled, value);
1730
if (GetState(
States
.UseWaitCursor))
1926
public bool IsDisposed => GetState(
States
.Disposed);
1948
public bool Disposing => GetState(
States
.Disposing);
2021
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
2026
SetState(
States
.Enabled, value);
2317
if (GetState(
States
.Disposing |
States
.Disposed))
2431
if (!GetState(
States
.CheckedHost))
2436
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2442
SetState(
States
.HostedInDialog, false);
2458
SetState(
States
.HostedInDialog, true);
2467
SetState(
States
.CheckedHost, true);
2470
return GetState(
States
.HostedInDialog);
2593
get => GetState(
States
.IsAccessible);
2594
set => SetState(
States
.IsAccessible, value);
2643
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2646
return GetState(
States
.Mirrored);
2943
public bool RecreatingHandle => GetState(
States
.Recreate);
3350
get => (_state &
States
.TabStop) != 0;
3355
SetState(
States
.TabStop, value);
3619
get => GetState(
States
.UseWaitCursor);
3622
if (GetState(
States
.UseWaitCursor) != value)
3624
SetState(
States
.UseWaitCursor, value);
4037
SetState(
States
.LayoutIsDirty, true);
4043
if (GetState(
States
.LayoutIsDirty))
4526
SetState(
States
.CheckedHost, false);
4771
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4773
if (GetState(
States
.CreatingHandle))
4782
SetState(
States
.CreatingHandle, true);
4791
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4825
SetState(
States
.CreatingHandle, false);
4868
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4873
SetState(
States
.Created, true);
4905
SetState(
States
.Created, false);
4943
SetState(
States
.ThreadMarshalPending, true);
4987
if (GetState(
States
.OwnCtlBrush))
5010
if (GetState(
States
.Disposing))
5015
if (GetState(
States
.CreatingHandle))
5023
SetState(
States
.Disposing, true);
5059
SetState(
States
.Disposing, false);
5060
SetState(
States
.Disposed, true);
5366
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5598
if (!GetState(
States
.TopLevel) && !(
5660
internal bool DesiredVisibility => GetState(
States
.Visible);
6028
private protected bool GetState(
States
flag) => (_state & flag) != 0;
6054
if (!GetState(
States
.TrackingMouseEvent))
6056
SetState(
States
.TrackingMouseEvent, true);
6896
if (GetState(
States
.OwnCtlBrush))
7647
if (GetState(
States
.Enabled))
7691
SetState(
States
.ParentRecreating, false);
7706
SetState(
States
.ParentRecreating, true);
8024
if (GetState(
States
.ThreadMarshalPending))
8027
SetState(
States
.ThreadMarshalPending, false);
8145
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
8383
ParentInternal.SetState(
States
.LayoutIsDirty, true);
8656
|| GetState(
States
.ExceptionWhilePainting))
9071
if (GetState(
States
.ExceptionWhilePainting))
9106
SetState(
States
.ExceptionWhilePainting, true);
9178
SetState(
States
.LayoutDeferred, true);
9207
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
9213
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9966
bool created = GetState(
States
.Created);
9968
if (GetState(
States
.TrackingMouseEvent))
9970
SetState(
States
.MouseEnterPending, true);
9977
SetState(
States
.Recreate, true);
10027
SetState(
States
.Created, false);
10034
SetState(
States
.Recreate, false);
10199
if (GetState(
States
.TrackingMouseEvent))
10248
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
10287
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
10318
SetState(
States
.DropTarget, accept);
10907
if (!GetState(
States
.SizeLockedByOS))
10983
SetState(
States
.Created, false);
11062
private protected void SetState(
States
flag, bool value)
11124
SetState(
States
.TopLevel, value);
11172
SetState(
States
.Visible, value);
11193
SetState(
States
.Visible, !value);
11200
SetState(
States
.Visible, value);
11235
SetState(
States
.Visible, value);
11317
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
11563
SetState(
States
.TrackingMouseEvent, false);
11768
_state |=
States
.NoZOrder;
11779
_state &= ~
States
.NoZOrder;
11817
if ((_state &
States
.Visible) != 0)
11830
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
12157
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
12178
SetState(
States
.Created, false);
12183
SetState(
States
.Visible, false);
12222
SetState(
States
.MousePressed, true);
12416
&& GetState(
States
.MousePressed)
12422
if (!GetState(
States
.DoubleClickFired))
12440
SetState(
States
.DoubleClickFired, false);
12441
SetState(
States
.MousePressed, false);
12442
SetState(
States
.ValidationCancelled, false);
12824
if (_state.HasFlag(
States
.Recreate))
12834
bool oldVisibleBit = GetState(
States
.Visible);
12835
SetState(
States
.Visible, true);
12849
SetState(
States
.Visible, oldVisibleBit);
12868
SetState(
States
.Visible, false);
12872
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12983
&& (_state &
States
.NoZOrder) == 0)
13203
SetState(
States
.DoubleClickFired, true);
13220
SetState(
States
.DoubleClickFired, true);
13245
SetState(
States
.DoubleClickFired, true);
13296
SetState(
States
.DoubleClickFired, true);
13447
bool IArrangedElement.ParticipatesInLayout => GetState(
States
.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16843
if (GetState(
States
.Visible))
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
716
if (RecreatingHandle || GetState(
States
.CreatingHandle))
2449
if (GetState(
States
.Disposed))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
666
SetState(
States
.Modal, true);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3314
if (m.LParamInternal == Handle && !GetState(
States
.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4705
get { return GetState(
States
.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1083
SetState(
States
.Visible, false);
1088
SetState(
States
.Modal, true);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
67
get { return GetState(
States
.Visible); }
System\Windows\Forms\Form.cs (19)
209
SetState(
States
.Visible, false);
210
SetState(
States
.TopLevel, true);
810
SetState(
States
.SizeLockedByOS, true);
1466
bool oldVisibleBit = GetState(
States
.Visible);
1496
SetState(
States
.TopLevel, false);
1557
public bool Modal => GetState(
States
.Modal);
2202
SetState(
States
.Visible, false);
2209
SetState(
States
.Visible, true);
2551
SetState(
States
.SizeLockedByOS, false);
2555
SetState(
States
.SizeLockedByOS, true);
3246
if (GetState(
States
.CreatingHandle))
3837
return GetState(
States
.Visible) && IsHandleCreated;
4309
if (GetState(
States
.Modal))
5739
SetState(
States
.Modal, true);
5825
SetState(
States
.Modal, false);
6074
if (GetState(
States
.Modal))
6598
SetState(
States
.SizeLockedByOS, false);
6602
SetState(
States
.SizeLockedByOS, true);
7006
if (!GetState(
States
.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
102
SetState(
States
.Enabled, false);
System\Windows\Forms\SendKeys\SendKeys.SKWindow.cs (1)
15
SetState(
States
.TopLevel, true);
System\Windows\Forms\UserControl.cs (2)
32
SetState(
States
.Visible, true);
33
SetState(
States
.TopLevel, false);