171 references to States
System.Windows.Forms (171)
System\Windows\Forms\ActiveX\AxHost.cs (7)
430
else if (containingControl.Visible && !GetState(
States
.Visible) && IsHandleCreated && GetOcState() >= OC_INPLACE)
1025
SetState(
States
.Visible, false);
1534
if (GetState(
States
.Visible) == value)
1588
SetState(
States
.Visible, value);
3145
bool visible = GetState(
States
.Visible);
3150
if (visible != GetState(
States
.Visible))
3152
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)
255
private
States
_state;
318
_state =
States
.Visible |
States
.Enabled |
States
.TabStop |
States
.CausesValidation;
532
get => GetState(
States
.AllowDrop);
535
if (GetState(
States
.AllowDrop) == value)
540
SetState(
States
.AllowDrop, value);
554
SetState(
States
.AllowDrop, !value);
700
SetState(
States
.OwnCtlBrush, false);
705
SetState(
States
.OwnCtlBrush, true);
1081
get => GetState(
States
.CausesValidation);
1086
SetState(
States
.CausesValidation, value);
1278
public bool Created => GetState(
States
.Created);
1327
if (!_state.HasFlag(
States
.TopLevel))
1339
if (_state.HasFlag(
States
.TabStop))
1344
if (_state.HasFlag(
States
.Visible))
1411
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1412
set => SetState(
States
.ValidationCancelled, value);
1463
if (GetState(
States
.UseWaitCursor))
1659
public bool IsDisposed => GetState(
States
.Disposed);
1681
public bool Disposing => GetState(
States
.Disposing);
1754
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
1759
SetState(
States
.Enabled, value);
2050
if (GetState(
States
.Disposing |
States
.Disposed))
2164
if (!GetState(
States
.CheckedHost))
2169
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2175
SetState(
States
.HostedInDialog, false);
2191
SetState(
States
.HostedInDialog, true);
2200
SetState(
States
.CheckedHost, true);
2203
return GetState(
States
.HostedInDialog);
2326
get => GetState(
States
.IsAccessible);
2327
set => SetState(
States
.IsAccessible, value);
2376
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2379
return GetState(
States
.Mirrored);
2676
public bool RecreatingHandle => GetState(
States
.Recreate);
3083
get => (_state &
States
.TabStop) != 0;
3088
SetState(
States
.TabStop, value);
3352
get => GetState(
States
.UseWaitCursor);
3355
if (GetState(
States
.UseWaitCursor) != value)
3357
SetState(
States
.UseWaitCursor, value);
3757
SetState(
States
.LayoutIsDirty, true);
3763
if (GetState(
States
.LayoutIsDirty))
4222
SetState(
States
.CheckedHost, false);
4468
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4470
if (GetState(
States
.CreatingHandle))
4479
SetState(
States
.CreatingHandle, true);
4488
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4522
SetState(
States
.CreatingHandle, false);
4565
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4570
SetState(
States
.Created, true);
4602
SetState(
States
.Created, false);
4640
SetState(
States
.ThreadMarshalPending, true);
4684
if (GetState(
States
.OwnCtlBrush))
4707
if (GetState(
States
.Disposing))
4712
if (GetState(
States
.CreatingHandle))
4720
SetState(
States
.Disposing, true);
4756
SetState(
States
.Disposing, false);
4757
SetState(
States
.Disposed, true);
5015
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5246
if (!GetState(
States
.TopLevel) && !(
5308
internal bool DesiredVisibility => GetState(
States
.Visible);
5676
private protected bool GetState(
States
flag) => (_state & flag) != 0;
5702
if (!GetState(
States
.TrackingMouseEvent))
5704
SetState(
States
.TrackingMouseEvent, true);
6542
if (GetState(
States
.OwnCtlBrush))
6918
if (GetState(
States
.Enabled))
6965
SetState(
States
.ParentRecreating, false);
6980
SetState(
States
.ParentRecreating, true);
7291
if (GetState(
States
.ThreadMarshalPending))
7294
SetState(
States
.ThreadMarshalPending, false);
7407
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7648
ParentInternal.SetState(
States
.LayoutIsDirty, true);
7921
|| GetState(
States
.ExceptionWhilePainting))
8224
if (GetState(
States
.ExceptionWhilePainting))
8259
SetState(
States
.ExceptionWhilePainting, true);
8331
SetState(
States
.LayoutDeferred, true);
8360
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
8366
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9117
bool created = GetState(
States
.Created);
9118
if (GetState(
States
.TrackingMouseEvent))
9120
SetState(
States
.MouseEnterPending, true);
9127
SetState(
States
.Recreate, true);
9175
SetState(
States
.Created, false);
9182
SetState(
States
.Recreate, false);
9332
if (GetState(
States
.TrackingMouseEvent))
9381
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
9420
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
9451
SetState(
States
.DropTarget, accept);
10051
if (!GetState(
States
.SizeLockedByOS))
10127
SetState(
States
.Created, false);
10206
private protected void SetState(
States
flag, bool value)
10254
SetState(
States
.TopLevel, value);
10302
SetState(
States
.Visible, value);
10323
SetState(
States
.Visible, !value);
10330
SetState(
States
.Visible, value);
10365
SetState(
States
.Visible, value);
10447
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
10693
SetState(
States
.TrackingMouseEvent, false);
10898
_state |=
States
.NoZOrder;
10909
_state &= ~
States
.NoZOrder;
10947
if ((_state &
States
.Visible) != 0)
10960
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
11287
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
11308
SetState(
States
.Created, false);
11313
SetState(
States
.Visible, false);
11352
SetState(
States
.MousePressed, true);
11545
&& GetState(
States
.MousePressed)
11551
if (!GetState(
States
.DoubleClickFired))
11569
SetState(
States
.DoubleClickFired, false);
11570
SetState(
States
.MousePressed, false);
11571
SetState(
States
.ValidationCancelled, false);
11954
if (_state.HasFlag(
States
.Recreate))
11964
bool oldVisibleBit = GetState(
States
.Visible);
11965
SetState(
States
.Visible, true);
11979
SetState(
States
.Visible, oldVisibleBit);
11998
SetState(
States
.Visible, false);
12002
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12113
&& (_state &
States
.NoZOrder) == 0)
12333
SetState(
States
.DoubleClickFired, true);
12350
SetState(
States
.DoubleClickFired, true);
12375
SetState(
States
.DoubleClickFired, true);
12426
SetState(
States
.DoubleClickFired, true);
12569
bool IArrangedElement.ParticipatesInLayout => GetState(
States
.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16833
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)
3219
if (m.LParamInternal == Handle && !GetState(
States
.CreatingHandle))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4667
get { return GetState(
States
.Visible); }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1089
SetState(
States
.Visible, false);
1094
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);