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)
258
private
States
_state;
325
_state =
States
.Visible |
States
.Enabled |
States
.TabStop |
States
.CausesValidation;
601
get => GetState(
States
.AllowDrop);
604
if (GetState(
States
.AllowDrop) == value)
609
SetState(
States
.AllowDrop, value);
623
SetState(
States
.AllowDrop, !value);
769
SetState(
States
.OwnCtlBrush, false);
774
SetState(
States
.OwnCtlBrush, true);
1150
get => GetState(
States
.CausesValidation);
1155
SetState(
States
.CausesValidation, value);
1347
public bool Created => GetState(
States
.Created);
1396
if (!_state.HasFlag(
States
.TopLevel))
1408
if (_state.HasFlag(
States
.TabStop))
1413
if (_state.HasFlag(
States
.Visible))
1480
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1481
set => SetState(
States
.ValidationCancelled, value);
1532
if (GetState(
States
.UseWaitCursor))
1728
public bool IsDisposed => GetState(
States
.Disposed);
1750
public bool Disposing => GetState(
States
.Disposing);
1823
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
1828
SetState(
States
.Enabled, value);
2119
if (GetState(
States
.Disposing |
States
.Disposed))
2233
if (!GetState(
States
.CheckedHost))
2238
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2244
SetState(
States
.HostedInDialog, false);
2260
SetState(
States
.HostedInDialog, true);
2269
SetState(
States
.CheckedHost, true);
2272
return GetState(
States
.HostedInDialog);
2395
get => GetState(
States
.IsAccessible);
2396
set => SetState(
States
.IsAccessible, value);
2445
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2448
return GetState(
States
.Mirrored);
2745
public bool RecreatingHandle => GetState(
States
.Recreate);
3152
get => (_state &
States
.TabStop) != 0;
3157
SetState(
States
.TabStop, value);
3421
get => GetState(
States
.UseWaitCursor);
3424
if (GetState(
States
.UseWaitCursor) != value)
3426
SetState(
States
.UseWaitCursor, value);
3826
SetState(
States
.LayoutIsDirty, true);
3832
if (GetState(
States
.LayoutIsDirty))
4291
SetState(
States
.CheckedHost, false);
4537
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4539
if (GetState(
States
.CreatingHandle))
4548
SetState(
States
.CreatingHandle, true);
4557
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4591
SetState(
States
.CreatingHandle, false);
4634
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4639
SetState(
States
.Created, true);
4671
SetState(
States
.Created, false);
4709
SetState(
States
.ThreadMarshalPending, true);
4753
if (GetState(
States
.OwnCtlBrush))
4776
if (GetState(
States
.Disposing))
4781
if (GetState(
States
.CreatingHandle))
4789
SetState(
States
.Disposing, true);
4825
SetState(
States
.Disposing, false);
4826
SetState(
States
.Disposed, true);
5124
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5355
if (!GetState(
States
.TopLevel) && !(
5417
internal bool DesiredVisibility => GetState(
States
.Visible);
5785
private protected bool GetState(
States
flag) => (_state & flag) != 0;
5811
if (!GetState(
States
.TrackingMouseEvent))
5813
SetState(
States
.TrackingMouseEvent, true);
6651
if (GetState(
States
.OwnCtlBrush))
7027
if (GetState(
States
.Enabled))
7071
SetState(
States
.ParentRecreating, false);
7086
SetState(
States
.ParentRecreating, true);
7399
if (GetState(
States
.ThreadMarshalPending))
7402
SetState(
States
.ThreadMarshalPending, false);
7516
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7754
ParentInternal.SetState(
States
.LayoutIsDirty, true);
8027
|| GetState(
States
.ExceptionWhilePainting))
8321
if (GetState(
States
.ExceptionWhilePainting))
8356
SetState(
States
.ExceptionWhilePainting, true);
8428
SetState(
States
.LayoutDeferred, true);
8457
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
8463
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9216
bool created = GetState(
States
.Created);
9218
if (GetState(
States
.TrackingMouseEvent))
9220
SetState(
States
.MouseEnterPending, true);
9227
SetState(
States
.Recreate, true);
9277
SetState(
States
.Created, false);
9284
SetState(
States
.Recreate, false);
9450
if (GetState(
States
.TrackingMouseEvent))
9499
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
9538
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
9569
SetState(
States
.DropTarget, accept);
10158
if (!GetState(
States
.SizeLockedByOS))
10234
SetState(
States
.Created, false);
10313
private protected void SetState(
States
flag, bool value)
10361
SetState(
States
.TopLevel, value);
10409
SetState(
States
.Visible, value);
10430
SetState(
States
.Visible, !value);
10437
SetState(
States
.Visible, value);
10472
SetState(
States
.Visible, value);
10554
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
10800
SetState(
States
.TrackingMouseEvent, false);
11005
_state |=
States
.NoZOrder;
11016
_state &= ~
States
.NoZOrder;
11054
if ((_state &
States
.Visible) != 0)
11067
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
11394
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
11415
SetState(
States
.Created, false);
11420
SetState(
States
.Visible, false);
11459
SetState(
States
.MousePressed, true);
11649
&& GetState(
States
.MousePressed)
11655
if (!GetState(
States
.DoubleClickFired))
11673
SetState(
States
.DoubleClickFired, false);
11674
SetState(
States
.MousePressed, false);
11675
SetState(
States
.ValidationCancelled, false);
12057
if (_state.HasFlag(
States
.Recreate))
12067
bool oldVisibleBit = GetState(
States
.Visible);
12068
SetState(
States
.Visible, true);
12082
SetState(
States
.Visible, oldVisibleBit);
12101
SetState(
States
.Visible, false);
12105
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12216
&& (_state &
States
.NoZOrder) == 0)
12436
SetState(
States
.DoubleClickFired, true);
12453
SetState(
States
.DoubleClickFired, true);
12478
SetState(
States
.DoubleClickFired, true);
12529
SetState(
States
.DoubleClickFired, true);
12672
bool IArrangedElement.ParticipatesInLayout => GetState(
States
.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16846
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)
4671
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)
207
SetState(
States
.Visible, false);
208
SetState(
States
.TopLevel, true);
808
SetState(
States
.SizeLockedByOS, true);
1467
bool oldVisibleBit = GetState(
States
.Visible);
1497
SetState(
States
.TopLevel, false);
1558
public bool Modal => GetState(
States
.Modal);
2200
SetState(
States
.Visible, false);
2207
SetState(
States
.Visible, true);
2559
SetState(
States
.SizeLockedByOS, false);
2563
SetState(
States
.SizeLockedByOS, true);
3258
if (GetState(
States
.CreatingHandle))
3852
return GetState(
States
.Visible) && IsHandleCreated;
4312
if (GetState(
States
.Modal))
5716
SetState(
States
.Modal, true);
5802
SetState(
States
.Modal, false);
6050
if (GetState(
States
.Modal))
6567
SetState(
States
.SizeLockedByOS, false);
6571
SetState(
States
.SizeLockedByOS, true);
6978
if (!GetState(
States
.Recreate))
System\Windows\Forms\MDI\MDIClient.cs (1)
104
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);