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