171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
431
else if (containingControl.Visible && !GetState(
States
.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE)
1026
SetState(
States
.Visible, false);
1535
if (GetState(
States
.Visible) == value)
1589
SetState(
States
.Visible, value);
3146
bool visible = GetState(
States
.Visible);
3151
if (visible != GetState(
States
.Visible))
3153
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)
256
private
States
_state;
319
_state =
States
.Visible |
States
.Enabled |
States
.TabStop |
States
.CausesValidation;
533
get => GetState(
States
.AllowDrop);
536
if (GetState(
States
.AllowDrop) == value)
541
SetState(
States
.AllowDrop, value);
555
SetState(
States
.AllowDrop, !value);
701
SetState(
States
.OwnCtlBrush, false);
706
SetState(
States
.OwnCtlBrush, true);
1082
get => GetState(
States
.CausesValidation);
1087
SetState(
States
.CausesValidation, value);
1279
public bool Created => GetState(
States
.Created);
1328
if (!_state.HasFlag(
States
.TopLevel))
1340
if (_state.HasFlag(
States
.TabStop))
1345
if (_state.HasFlag(
States
.Visible))
1412
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1413
set => SetState(
States
.ValidationCancelled, value);
1464
if (GetState(
States
.UseWaitCursor))
1660
public bool IsDisposed => GetState(
States
.Disposed);
1682
public bool Disposing => GetState(
States
.Disposing);
1755
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
1760
SetState(
States
.Enabled, value);
2051
if (GetState(
States
.Disposing |
States
.Disposed))
2165
if (!GetState(
States
.CheckedHost))
2170
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2176
SetState(
States
.HostedInDialog, false);
2192
SetState(
States
.HostedInDialog, true);
2201
SetState(
States
.CheckedHost, true);
2204
return GetState(
States
.HostedInDialog);
2327
get => GetState(
States
.IsAccessible);
2328
set => SetState(
States
.IsAccessible, value);
2377
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2380
return GetState(
States
.Mirrored);
2677
public bool RecreatingHandle => GetState(
States
.Recreate);
3084
get => (_state &
States
.TabStop) != 0;
3089
SetState(
States
.TabStop, value);
3353
get => GetState(
States
.UseWaitCursor);
3356
if (GetState(
States
.UseWaitCursor) != value)
3358
SetState(
States
.UseWaitCursor, value);
3758
SetState(
States
.LayoutIsDirty, true);
3764
if (GetState(
States
.LayoutIsDirty))
4223
SetState(
States
.CheckedHost, false);
4469
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4471
if (GetState(
States
.CreatingHandle))
4480
SetState(
States
.CreatingHandle, true);
4489
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4523
SetState(
States
.CreatingHandle, false);
4566
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4571
SetState(
States
.Created, true);
4603
SetState(
States
.Created, false);
4641
SetState(
States
.ThreadMarshalPending, true);
4685
if (GetState(
States
.OwnCtlBrush))
4708
if (GetState(
States
.Disposing))
4713
if (GetState(
States
.CreatingHandle))
4721
SetState(
States
.Disposing, true);
4757
SetState(
States
.Disposing, false);
4758
SetState(
States
.Disposed, true);
5056
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5287
if (!GetState(
States
.TopLevel) && !(
5349
internal bool DesiredVisibility => GetState(
States
.Visible);
5717
private protected bool GetState(
States
flag) => (_state & flag) != 0;
5743
if (!GetState(
States
.TrackingMouseEvent))
5745
SetState(
States
.TrackingMouseEvent, true);
6583
if (GetState(
States
.OwnCtlBrush))
6959
if (GetState(
States
.Enabled))
7006
SetState(
States
.ParentRecreating, false);
7021
SetState(
States
.ParentRecreating, true);
7332
if (GetState(
States
.ThreadMarshalPending))
7335
SetState(
States
.ThreadMarshalPending, false);
7448
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7689
ParentInternal.SetState(
States
.LayoutIsDirty, true);
7962
|| GetState(
States
.ExceptionWhilePainting))
8265
if (GetState(
States
.ExceptionWhilePainting))
8300
SetState(
States
.ExceptionWhilePainting, true);
8372
SetState(
States
.LayoutDeferred, true);
8401
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
8407
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9158
bool created = GetState(
States
.Created);
9159
if (GetState(
States
.TrackingMouseEvent))
9161
SetState(
States
.MouseEnterPending, true);
9168
SetState(
States
.Recreate, true);
9216
SetState(
States
.Created, false);
9223
SetState(
States
.Recreate, false);
9373
if (GetState(
States
.TrackingMouseEvent))
9422
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
9461
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
9492
SetState(
States
.DropTarget, accept);
10084
if (!GetState(
States
.SizeLockedByOS))
10160
SetState(
States
.Created, false);
10239
private protected void SetState(
States
flag, bool value)
10287
SetState(
States
.TopLevel, value);
10335
SetState(
States
.Visible, value);
10356
SetState(
States
.Visible, !value);
10363
SetState(
States
.Visible, value);
10398
SetState(
States
.Visible, value);
10480
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
10726
SetState(
States
.TrackingMouseEvent, false);
10931
_state |=
States
.NoZOrder;
10942
_state &= ~
States
.NoZOrder;
10980
if ((_state &
States
.Visible) != 0)
10993
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
11320
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
11341
SetState(
States
.Created, false);
11346
SetState(
States
.Visible, false);
11385
SetState(
States
.MousePressed, true);
11578
&& GetState(
States
.MousePressed)
11584
if (!GetState(
States
.DoubleClickFired))
11602
SetState(
States
.DoubleClickFired, false);
11603
SetState(
States
.MousePressed, false);
11604
SetState(
States
.ValidationCancelled, false);
11986
if (_state.HasFlag(
States
.Recreate))
11996
bool oldVisibleBit = GetState(
States
.Visible);
11997
SetState(
States
.Visible, true);
12011
SetState(
States
.Visible, oldVisibleBit);
12030
SetState(
States
.Visible, false);
12034
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12145
&& (_state &
States
.NoZOrder) == 0)
12365
SetState(
States
.DoubleClickFired, true);
12382
SetState(
States
.DoubleClickFired, true);
12407
SetState(
States
.DoubleClickFired, true);
12458
SetState(
States
.DoubleClickFired, true);
12601
bool IArrangedElement.ParticipatesInLayout => GetState(
States
.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16852
if (GetState(
States
.Visible))
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
718
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)
3230
if (m.LParamInternal == Handle && !GetState(
States
.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4662
get { return GetState(
States
.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1086
SetState(
States
.Visible, false);
1091
SetState(
States
.Modal, true);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
67
get { return GetState(
States
.Visible); }
System\Windows\Forms\Form.cs (19)
206
SetState(
States
.Visible, false);
207
SetState(
States
.TopLevel, true);
811
SetState(
States
.SizeLockedByOS, true);
1470
bool oldVisibleBit = GetState(
States
.Visible);
1500
SetState(
States
.TopLevel, false);
1561
public bool Modal => GetState(
States
.Modal);
2122
SetState(
States
.Visible, false);
2129
SetState(
States
.Visible, true);
2481
SetState(
States
.SizeLockedByOS, false);
2485
SetState(
States
.SizeLockedByOS, true);
3183
if (GetState(
States
.CreatingHandle))
3777
return GetState(
States
.Visible) && IsHandleCreated;
4246
if (GetState(
States
.Modal))
5625
SetState(
States
.Modal, true);
5711
SetState(
States
.Modal, false);
5959
if (GetState(
States
.Modal))
6476
SetState(
States
.SizeLockedByOS, false);
6480
SetState(
States
.SizeLockedByOS, true);
6887
if (!GetState(
States
.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
106
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);