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);
1364
get => GetState(
States
.CausesValidation);
1369
SetState(
States
.CausesValidation, value);
1554
public bool Created => GetState(
States
.Created);
1603
if (!_state.HasFlag(
States
.TopLevel))
1615
if (_state.HasFlag(
States
.TabStop))
1620
if (_state.HasFlag(
States
.Visible))
1687
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1688
set => SetState(
States
.ValidationCancelled, value);
1739
if (GetState(
States
.UseWaitCursor))
1935
public bool IsDisposed => GetState(
States
.Disposed);
1957
public bool Disposing => GetState(
States
.Disposing);
2030
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
2035
SetState(
States
.Enabled, value);
2326
if (GetState(
States
.Disposing |
States
.Disposed))
2440
if (!GetState(
States
.CheckedHost))
2445
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2451
SetState(
States
.HostedInDialog, false);
2467
SetState(
States
.HostedInDialog, true);
2476
SetState(
States
.CheckedHost, true);
2479
return GetState(
States
.HostedInDialog);
2602
get => GetState(
States
.IsAccessible);
2603
set => SetState(
States
.IsAccessible, value);
2652
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2655
return GetState(
States
.Mirrored);
2952
public bool RecreatingHandle => GetState(
States
.Recreate);
3359
get => (_state &
States
.TabStop) != 0;
3364
SetState(
States
.TabStop, value);
3628
get => GetState(
States
.UseWaitCursor);
3631
if (GetState(
States
.UseWaitCursor) != value)
3633
SetState(
States
.UseWaitCursor, value);
4046
SetState(
States
.LayoutIsDirty, true);
4052
if (GetState(
States
.LayoutIsDirty))
4535
SetState(
States
.CheckedHost, false);
4780
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4782
if (GetState(
States
.CreatingHandle))
4791
SetState(
States
.CreatingHandle, true);
4800
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4834
SetState(
States
.CreatingHandle, false);
4877
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4882
SetState(
States
.Created, true);
4914
SetState(
States
.Created, false);
4952
SetState(
States
.ThreadMarshalPending, true);
4996
if (GetState(
States
.OwnCtlBrush))
5019
if (GetState(
States
.Disposing))
5024
if (GetState(
States
.CreatingHandle))
5032
SetState(
States
.Disposing, true);
5068
SetState(
States
.Disposing, false);
5069
SetState(
States
.Disposed, true);
5375
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5607
if (!GetState(
States
.TopLevel) && !(
5669
internal bool DesiredVisibility => GetState(
States
.Visible);
6037
private protected bool GetState(
States
flag) => (_state & flag) != 0;
6063
if (!GetState(
States
.TrackingMouseEvent))
6065
SetState(
States
.TrackingMouseEvent, true);
6905
if (GetState(
States
.OwnCtlBrush))
7705
if (GetState(
States
.Enabled))
7749
SetState(
States
.ParentRecreating, false);
7764
SetState(
States
.ParentRecreating, true);
8082
if (GetState(
States
.ThreadMarshalPending))
8085
SetState(
States
.ThreadMarshalPending, false);
8203
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
8441
ParentInternal.SetState(
States
.LayoutIsDirty, true);
8714
|| GetState(
States
.ExceptionWhilePainting))
9129
if (GetState(
States
.ExceptionWhilePainting))
9164
SetState(
States
.ExceptionWhilePainting, true);
9236
SetState(
States
.LayoutDeferred, true);
9265
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
9271
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
10024
bool created = GetState(
States
.Created);
10026
if (GetState(
States
.TrackingMouseEvent))
10028
SetState(
States
.MouseEnterPending, true);
10035
SetState(
States
.Recreate, true);
10085
SetState(
States
.Created, false);
10092
SetState(
States
.Recreate, false);
10257
if (GetState(
States
.TrackingMouseEvent))
10306
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
10345
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
10376
SetState(
States
.DropTarget, accept);
10965
if (!GetState(
States
.SizeLockedByOS))
11041
SetState(
States
.Created, false);
11120
private protected void SetState(
States
flag, bool value)
11182
SetState(
States
.TopLevel, value);
11230
SetState(
States
.Visible, value);
11251
SetState(
States
.Visible, !value);
11258
SetState(
States
.Visible, value);
11293
SetState(
States
.Visible, value);
11375
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
11621
SetState(
States
.TrackingMouseEvent, false);
11826
_state |=
States
.NoZOrder;
11837
_state &= ~
States
.NoZOrder;
11875
if ((_state &
States
.Visible) != 0)
11888
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
12215
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
12236
SetState(
States
.Created, false);
12241
SetState(
States
.Visible, false);
12280
SetState(
States
.MousePressed, true);
12474
&& GetState(
States
.MousePressed)
12480
if (!GetState(
States
.DoubleClickFired))
12498
SetState(
States
.DoubleClickFired, false);
12499
SetState(
States
.MousePressed, false);
12500
SetState(
States
.ValidationCancelled, false);
12882
if (_state.HasFlag(
States
.Recreate))
12892
bool oldVisibleBit = GetState(
States
.Visible);
12893
SetState(
States
.Visible, true);
12907
SetState(
States
.Visible, oldVisibleBit);
12926
SetState(
States
.Visible, false);
12930
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
13041
&& (_state &
States
.NoZOrder) == 0)
13261
SetState(
States
.DoubleClickFired, true);
13278
SetState(
States
.DoubleClickFired, true);
13303
SetState(
States
.DoubleClickFired, true);
13354
SetState(
States
.DoubleClickFired, true);
13505
bool IArrangedElement.ParticipatesInLayout => GetState(
States
.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16908
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)
4710
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))
5788
SetState(
States
.Modal, true);
5874
SetState(
States
.Modal, false);
6123
if (GetState(
States
.Modal))
6647
SetState(
States
.SizeLockedByOS, false);
6651
SetState(
States
.SizeLockedByOS, true);
7055
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);