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)
258
private
States
_state;
325
_state =
States
.Visible |
States
.Enabled |
States
.TabStop |
States
.CausesValidation;
627
get => GetState(
States
.AllowDrop);
630
if (GetState(
States
.AllowDrop) == value)
635
SetState(
States
.AllowDrop, value);
649
SetState(
States
.AllowDrop, !value);
795
SetState(
States
.OwnCtlBrush, false);
800
SetState(
States
.OwnCtlBrush, true);
1176
get => GetState(
States
.CausesValidation);
1181
SetState(
States
.CausesValidation, value);
1366
public bool Created => GetState(
States
.Created);
1415
if (!_state.HasFlag(
States
.TopLevel))
1427
if (_state.HasFlag(
States
.TabStop))
1432
if (_state.HasFlag(
States
.Visible))
1499
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1500
set => SetState(
States
.ValidationCancelled, value);
1551
if (GetState(
States
.UseWaitCursor))
1747
public bool IsDisposed => GetState(
States
.Disposed);
1769
public bool Disposing => GetState(
States
.Disposing);
1842
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
1847
SetState(
States
.Enabled, value);
2138
if (GetState(
States
.Disposing |
States
.Disposed))
2252
if (!GetState(
States
.CheckedHost))
2257
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2263
SetState(
States
.HostedInDialog, false);
2279
SetState(
States
.HostedInDialog, true);
2288
SetState(
States
.CheckedHost, true);
2291
return GetState(
States
.HostedInDialog);
2414
get => GetState(
States
.IsAccessible);
2415
set => SetState(
States
.IsAccessible, value);
2464
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2467
return GetState(
States
.Mirrored);
2764
public bool RecreatingHandle => GetState(
States
.Recreate);
3171
get => (_state &
States
.TabStop) != 0;
3176
SetState(
States
.TabStop, value);
3440
get => GetState(
States
.UseWaitCursor);
3443
if (GetState(
States
.UseWaitCursor) != value)
3445
SetState(
States
.UseWaitCursor, value);
3845
SetState(
States
.LayoutIsDirty, true);
3851
if (GetState(
States
.LayoutIsDirty))
4310
SetState(
States
.CheckedHost, false);
4556
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4558
if (GetState(
States
.CreatingHandle))
4567
SetState(
States
.CreatingHandle, true);
4576
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4610
SetState(
States
.CreatingHandle, false);
4653
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4658
SetState(
States
.Created, true);
4690
SetState(
States
.Created, false);
4728
SetState(
States
.ThreadMarshalPending, true);
4772
if (GetState(
States
.OwnCtlBrush))
4795
if (GetState(
States
.Disposing))
4800
if (GetState(
States
.CreatingHandle))
4808
SetState(
States
.Disposing, true);
4844
SetState(
States
.Disposing, false);
4845
SetState(
States
.Disposed, true);
5143
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5374
if (!GetState(
States
.TopLevel) && !(
5436
internal bool DesiredVisibility => GetState(
States
.Visible);
5804
private protected bool GetState(
States
flag) => (_state & flag) != 0;
5830
if (!GetState(
States
.TrackingMouseEvent))
5832
SetState(
States
.TrackingMouseEvent, true);
6672
if (GetState(
States
.OwnCtlBrush))
7048
if (GetState(
States
.Enabled))
7092
SetState(
States
.ParentRecreating, false);
7107
SetState(
States
.ParentRecreating, true);
7418
if (GetState(
States
.ThreadMarshalPending))
7421
SetState(
States
.ThreadMarshalPending, false);
7535
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7773
ParentInternal.SetState(
States
.LayoutIsDirty, true);
8046
|| GetState(
States
.ExceptionWhilePainting))
8340
if (GetState(
States
.ExceptionWhilePainting))
8375
SetState(
States
.ExceptionWhilePainting, true);
8447
SetState(
States
.LayoutDeferred, true);
8476
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
8482
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9235
bool created = GetState(
States
.Created);
9237
if (GetState(
States
.TrackingMouseEvent))
9239
SetState(
States
.MouseEnterPending, true);
9246
SetState(
States
.Recreate, true);
9296
SetState(
States
.Created, false);
9303
SetState(
States
.Recreate, false);
9468
if (GetState(
States
.TrackingMouseEvent))
9517
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
9556
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
9587
SetState(
States
.DropTarget, accept);
10176
if (!GetState(
States
.SizeLockedByOS))
10252
SetState(
States
.Created, false);
10331
private protected void SetState(
States
flag, bool value)
10393
SetState(
States
.TopLevel, value);
10441
SetState(
States
.Visible, value);
10462
SetState(
States
.Visible, !value);
10469
SetState(
States
.Visible, value);
10504
SetState(
States
.Visible, value);
10586
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
10832
SetState(
States
.TrackingMouseEvent, false);
11037
_state |=
States
.NoZOrder;
11048
_state &= ~
States
.NoZOrder;
11086
if ((_state &
States
.Visible) != 0)
11099
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
11426
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
11447
SetState(
States
.Created, false);
11452
SetState(
States
.Visible, false);
11491
SetState(
States
.MousePressed, true);
11681
&& GetState(
States
.MousePressed)
11687
if (!GetState(
States
.DoubleClickFired))
11705
SetState(
States
.DoubleClickFired, false);
11706
SetState(
States
.MousePressed, false);
11707
SetState(
States
.ValidationCancelled, false);
12089
if (_state.HasFlag(
States
.Recreate))
12099
bool oldVisibleBit = GetState(
States
.Visible);
12100
SetState(
States
.Visible, true);
12114
SetState(
States
.Visible, oldVisibleBit);
12133
SetState(
States
.Visible, false);
12137
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12248
&& (_state &
States
.NoZOrder) == 0)
12468
SetState(
States
.DoubleClickFired, true);
12485
SetState(
States
.DoubleClickFired, true);
12510
SetState(
States
.DoubleClickFired, true);
12561
SetState(
States
.DoubleClickFired, true);
12704
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))
2447
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)
3211
if (m.LParamInternal == Handle && !GetState(
States
.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4665
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)
206
SetState(
States
.Visible, false);
207
SetState(
States
.TopLevel, true);
807
SetState(
States
.SizeLockedByOS, true);
1463
bool oldVisibleBit = GetState(
States
.Visible);
1493
SetState(
States
.TopLevel, false);
1554
public bool Modal => GetState(
States
.Modal);
2199
SetState(
States
.Visible, false);
2206
SetState(
States
.Visible, true);
2548
SetState(
States
.SizeLockedByOS, false);
2552
SetState(
States
.SizeLockedByOS, true);
3243
if (GetState(
States
.CreatingHandle))
3828
return GetState(
States
.Visible) && IsHandleCreated;
4293
if (GetState(
States
.Modal))
5723
SetState(
States
.Modal, true);
5809
SetState(
States
.Modal, false);
6058
if (GetState(
States
.Modal))
6582
SetState(
States
.SizeLockedByOS, false);
6586
SetState(
States
.SizeLockedByOS, true);
6990
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);