108 references to FormWindowState
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (2)
946
If MainForm.WindowState =
FormWindowState
.Minimized Then
947
MainForm.WindowState =
FormWindowState
.Normal
System.Windows.Forms (69)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2913
=> TopLevelControlInternal is Form parentForm && parentForm.WindowState ==
FormWindowState
.Minimized;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
928
if (mdiChild.WindowState ==
FormWindowState
.Maximized)
System\Windows\Forms\Form.cs (65)
190
Debug.Assert(_formState[s_formStateWindowState] == (int)
FormWindowState
.Normal, "Failed to set formState[FormStateWindowState]");
697
if (WindowState !=
FormWindowState
.Normal)
802
if (Visible && (WindowState is
FormWindowState
.Maximized or
FormWindowState
.Normal))
807
if (form is not null && form.WindowState ==
FormWindowState
.Maximized)
810
_formState[s_formStateWindowState] = (int)
FormWindowState
.Maximized;
1061
return (WindowState ==
FormWindowState
.Maximized || (IsMdiChild && (_formState[s_formStateMdiChildMax] == 1)));
1796
case
FormWindowState
.Maximized:
1798
case
FormWindowState
.Minimized:
2144
if (WindowState ==
FormWindowState
.Maximized)
2154
if (value && !IsMdiChild && (WindowState ==
FormWindowState
.Maximized || TopMost))
2469
[DefaultValue(
FormWindowState
.Normal)]
2471
public
FormWindowState
WindowState
2473
get => (
FormWindowState
)_formState[s_formStateWindowState];
2480
case
FormWindowState
.Normal:
2483
case
FormWindowState
.Maximized:
2484
case
FormWindowState
.Minimized:
2493
case
FormWindowState
.Normal:
2496
case
FormWindowState
.Maximized:
2499
case
FormWindowState
.Minimized:
2887
if (WindowState !=
FormWindowState
.Minimized)
2896
FormWindowState
winState = WindowState;
2901
bool showMin = MinimizeBox && winState !=
FormWindowState
.Minimized;
2902
bool showMax = MaximizeBox && winState !=
FormWindowState
.Maximized;
2904
bool showRestore = winState !=
FormWindowState
.Normal;
2905
bool showSize = sizableBorder && winState !=
FormWindowState
.Minimized
2906
&& winState !=
FormWindowState
.Maximized;
3007
if ((
FormWindowState
)_formState[s_formStateWindowState] !=
FormWindowState
.Normal
3308
&& (
FormWindowState
)_formState[s_formStateWindowState] ==
FormWindowState
.Maximized)
3312
_formState[s_formStateWindowState] = (int)
FormWindowState
.Normal;
3315
_formState[s_formStateWindowState] = (int)
FormWindowState
.Maximized;
3675
if (WindowState !=
FormWindowState
.Maximized)
3691
switch ((
FormWindowState
)_formState[s_formStateWindowState])
3693
case
FormWindowState
.Maximized:
3696
case
FormWindowState
.Minimized:
3792
|| WindowState ==
FormWindowState
.Minimized))
4862
if (!IsMdiChild && (WindowState ==
FormWindowState
.Minimized || WindowState ==
FormWindowState
.Maximized))
4988
if (_formState[s_formStateWindowState] == (int)
FormWindowState
.Minimized)
5002
if (WindowState ==
FormWindowState
.Normal)
5085
if (WindowState ==
FormWindowState
.Normal)
5110
if (WindowState ==
FormWindowState
.Normal)
5135
if (WindowState !=
FormWindowState
.Normal)
5169
if (WindowState !=
FormWindowState
.Normal)
5225
if (WindowState ==
FormWindowState
.Normal && (Height != height || Width != width))
5908
if (_formState[s_formStateWindowState] != (int)
FormWindowState
.Minimized)
6119
if (activeMdiChild is not null && activeMdiChild.WindowState ==
FormWindowState
.Maximized)
6376
if (WindowState ==
FormWindowState
.Maximized && MdiParent?.MdiControlStrip is not null)
6402
FormWindowState
oldState = WindowState;
6416
if (_formState[s_formStateWindowState] != (int)
FormWindowState
.Normal)
6418
_formState[s_formStateWindowState] = (int)
FormWindowState
.Normal;
6425
_formState[s_formStateWindowState] = (int)
FormWindowState
.Maximized;
6434
_formState[s_formStateWindowState] = (int)
FormWindowState
.Minimized;
6445
if (oldState ==
FormWindowState
.Normal && WindowState !=
FormWindowState
.Normal)
6447
if (WindowState ==
FormWindowState
.Minimized)
6468
if (oldState ==
FormWindowState
.Minimized && WindowState !=
FormWindowState
.Minimized)
6475
case
FormWindowState
.Normal:
6478
case
FormWindowState
.Maximized:
6479
case
FormWindowState
.Minimized:
6557
WindowState =
FormWindowState
.Maximized;
6560
WindowState =
FormWindowState
.Minimized;
System\Windows\Forms\MDI\MDIClient.cs (1)
247
if (Controls[i] is Form child && child.CanRecreateHandle() && child.WindowState ==
FormWindowState
.Minimized)
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
331
public new
FormWindowState
WindowState
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\FormDocumentDesigner.cs (5)
256
private
FormWindowState
WindowState
258
get => (
FormWindowState
)ShadowProperties[nameof(WindowState)];
323
if (windowStateProp is not null && windowStateProp.PropertyType == typeof(
FormWindowState
))
325
WindowState = (
FormWindowState
)windowStateProp.GetValue(component);
344
form.WindowState =
FormWindowState
.Normal;
System.Windows.Forms.IntegrationTests.Common (2)
TestHelpers.cs (2)
385
form.WindowState =
FormWindowState
.Minimized;
387
form.WindowState =
FormWindowState
.Normal;
System.Windows.Forms.Tests (18)
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
163
Assert.Equal(
FormWindowState
.Normal, control.WindowState);
System\Windows\Forms\FormTests.cs (6)
165
Assert.Equal(
FormWindowState
.Normal, control.WindowState);
993
Assert.Equal(
FormWindowState
.Maximized, form.WindowState);
1017
form.WindowState =
FormWindowState
.Maximized;
1022
Assert.Equal(
FormWindowState
.Maximized, form.WindowState);
1026
form.WindowState =
FormWindowState
.Normal;
1248
control.WindowState =
FormWindowState
.Maximized;
System\Windows\Forms\MdiControlStripTests.cs (4)
212
WindowState =
FormWindowState
.Maximized
258
WindowState =
FormWindowState
.Maximized
297
WindowState =
FormWindowState
.Maximized
324
mdiChild.WindowState =
FormWindowState
.Maximized;
System\Windows\Forms\PropertyStoreTests.cs (7)
31
{ 16,
FormWindowState
.Maximized }
74
store.TryGetValue(1, out
FormWindowState
outValue).Should().BeFalse();
75
FormWindowState
windowState = default;
105
Action action = () => store.TryGetValue(1, out
FormWindowState
outValue);
134
store.TryGetValue(1, out
FormWindowState
? outValue).Should().BeFalse();
386
FormWindowState
value = default;
390
value.Should().Be(store.GetValueOrDefault<
FormWindowState
>(1));
System.Windows.Forms.UI.IntegrationTests (8)
FormTests.cs (6)
23
[InlineData(
FormWindowState
.Normal)]
24
[InlineData(
FormWindowState
.Maximized)]
25
public async Task Form_SnapsLeftAsync(
FormWindowState
windowState)
82
[InlineData(
FormWindowState
.Normal)]
83
[InlineData(
FormWindowState
.Maximized)]
84
public async Task Form_SnapsRightAsync(
FormWindowState
windowState)
MDITests.cs (2)
24
WindowState =
FormWindowState
.Minimized
46
WindowState =
FormWindowState
.Minimized
WinFormsControlsTest (4)
MdiChild.cs (2)
31
WindowState =
FormWindowState
.Maximized
86
WindowState =
FormWindowState
.Normal;
MdiParent.cs (2)
25
WindowState =
FormWindowState
.Maximized
53
WindowState =
FormWindowState
.Maximized