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;
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);
1373
public bool Created => GetState(
States
.Created);
1422
if (!_state.HasFlag(
States
.TopLevel))
1434
if (_state.HasFlag(
States
.TabStop))
1439
if (_state.HasFlag(
States
.Visible))
1506
get => GetState(
States
.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled);
1507
set => SetState(
States
.ValidationCancelled, value);
1558
if (GetState(
States
.UseWaitCursor))
1754
public bool IsDisposed => GetState(
States
.Disposed);
1776
public bool Disposing => GetState(
States
.Disposing);
1849
return GetState(
States
.Enabled) && (ParentInternal is null || ParentInternal.Enabled);
1854
SetState(
States
.Enabled, value);
2145
if (GetState(
States
.Disposing |
States
.Disposed))
2259
if (!GetState(
States
.CheckedHost))
2264
SetState(
States
.HostedInDialog, topMost.HostedInWin32DialogManager);
2270
SetState(
States
.HostedInDialog, false);
2286
SetState(
States
.HostedInDialog, true);
2295
SetState(
States
.CheckedHost, true);
2298
return GetState(
States
.HostedInDialog);
2421
get => GetState(
States
.IsAccessible);
2422
set => SetState(
States
.IsAccessible, value);
2471
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
2474
return GetState(
States
.Mirrored);
2771
public bool RecreatingHandle => GetState(
States
.Recreate);
3178
get => (_state &
States
.TabStop) != 0;
3183
SetState(
States
.TabStop, value);
3447
get => GetState(
States
.UseWaitCursor);
3450
if (GetState(
States
.UseWaitCursor) != value)
3452
SetState(
States
.UseWaitCursor, value);
3852
SetState(
States
.LayoutIsDirty, true);
3858
if (GetState(
States
.LayoutIsDirty))
4317
SetState(
States
.CheckedHost, false);
4563
ObjectDisposedException.ThrowIf(GetState(
States
.Disposed), this);
4565
if (GetState(
States
.CreatingHandle))
4574
SetState(
States
.CreatingHandle, true);
4583
SetState(
States
.Mirrored, (cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_LAYOUTRTL) != 0);
4617
SetState(
States
.CreatingHandle, false);
4660
if (!ignoreVisible && (GetState(
States
.Created) || !Visible))
4665
SetState(
States
.Created, true);
4697
SetState(
States
.Created, false);
4735
SetState(
States
.ThreadMarshalPending, true);
4779
if (GetState(
States
.OwnCtlBrush))
4802
if (GetState(
States
.Disposing))
4807
if (GetState(
States
.CreatingHandle))
4815
SetState(
States
.Disposing, true);
4851
SetState(
States
.Disposing, false);
4852
SetState(
States
.Disposed, true);
5150
protected bool GetTopLevel() => (_state &
States
.TopLevel) != 0;
5381
if (!GetState(
States
.TopLevel) && !(
5443
internal bool DesiredVisibility => GetState(
States
.Visible);
5811
private protected bool GetState(
States
flag) => (_state & flag) != 0;
5837
if (!GetState(
States
.TrackingMouseEvent))
5839
SetState(
States
.TrackingMouseEvent, true);
6677
if (GetState(
States
.OwnCtlBrush))
7053
if (GetState(
States
.Enabled))
7097
SetState(
States
.ParentRecreating, false);
7112
SetState(
States
.ParentRecreating, true);
7425
if (GetState(
States
.ThreadMarshalPending))
7428
SetState(
States
.ThreadMarshalPending, false);
7542
if (!RecreatingHandle && GetState(
States
.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7780
ParentInternal.SetState(
States
.LayoutIsDirty, true);
8053
|| GetState(
States
.ExceptionWhilePainting))
8347
if (GetState(
States
.ExceptionWhilePainting))
8382
SetState(
States
.ExceptionWhilePainting, true);
8454
SetState(
States
.LayoutDeferred, true);
8483
SetState(
States
.LayoutDeferred |
States
.LayoutIsDirty, false);
8489
if (ParentInternal is not null && ParentInternal.GetState(
States
.LayoutIsDirty))
9242
bool created = GetState(
States
.Created);
9244
if (GetState(
States
.TrackingMouseEvent))
9246
SetState(
States
.MouseEnterPending, true);
9253
SetState(
States
.Recreate, true);
9303
SetState(
States
.Created, false);
9310
SetState(
States
.Recreate, false);
9476
if (GetState(
States
.TrackingMouseEvent))
9525
if (LayoutSuspendCount == 0 && GetState(
States
.LayoutDeferred) && performLayout)
9564
if (accept == GetState(
States
.DropTarget) || !IsHandleCreated)
9595
SetState(
States
.DropTarget, accept);
10184
if (!GetState(
States
.SizeLockedByOS))
10260
SetState(
States
.Created, false);
10339
private protected void SetState(
States
flag, bool value)
10402
SetState(
States
.TopLevel, value);
10451
SetState(
States
.Visible, value);
10472
SetState(
States
.Visible, !value);
10479
SetState(
States
.Visible, value);
10514
SetState(
States
.Visible, value);
10596
private bool ShouldSerializeEnabled() => !GetState(
States
.Enabled);
10842
SetState(
States
.TrackingMouseEvent, false);
11047
_state |=
States
.NoZOrder;
11058
_state &= ~
States
.NoZOrder;
11096
if ((_state &
States
.Visible) != 0)
11109
SetState(
States
.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL));
11436
if (!RecreatingHandle && !Disposing && !IsDisposed && GetState(
States
.TrackingMouseEvent))
11457
SetState(
States
.Created, false);
11462
SetState(
States
.Visible, false);
11501
SetState(
States
.MousePressed, true);
11691
&& GetState(
States
.MousePressed)
11697
if (!GetState(
States
.DoubleClickFired))
11715
SetState(
States
.DoubleClickFired, false);
11716
SetState(
States
.MousePressed, false);
11717
SetState(
States
.ValidationCancelled, false);
12099
if (_state.HasFlag(
States
.Recreate))
12109
bool oldVisibleBit = GetState(
States
.Visible);
12110
SetState(
States
.Visible, true);
12124
SetState(
States
.Visible, oldVisibleBit);
12143
SetState(
States
.Visible, false);
12147
if (!GetState(
States
.ParentRecreating) && (oldVisibleProperty != visible))
12258
&& (_state &
States
.NoZOrder) == 0)
12478
SetState(
States
.DoubleClickFired, true);
12495
SetState(
States
.DoubleClickFired, true);
12520
SetState(
States
.DoubleClickFired, true);
12571
SetState(
States
.DoubleClickFired, true);
12714
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)
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)
3211
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);
1464
bool oldVisibleBit = GetState(
States
.Visible);
1494
SetState(
States
.TopLevel, false);
1555
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))
3843
return GetState(
States
.Visible) && IsHandleCreated;
4308
if (GetState(
States
.Modal))
5740
SetState(
States
.Modal, true);
5826
SetState(
States
.Modal, false);
6075
if (GetState(
States
.Modal))
6600
SetState(
States
.SizeLockedByOS, false);
6604
SetState(
States
.SizeLockedByOS, true);
7008
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);