winforms\Managed\System\WinForms\Form.cs (142)
278Debug.Assert(formState[FormStateAllowTransparency] == 0, "Failed to set formState[FormStateAllowTransparency]");
279Debug.Assert(formState[FormStateBorderStyle] == (int)FormBorderStyle.Sizable, "Failed to set formState[FormStateBorderStyle]");
280Debug.Assert(formState[FormStateTaskBar] == 1, "Failed to set formState[FormStateTaskBar]");
281Debug.Assert(formState[FormStateControlBox] == 1, "Failed to set formState[FormStateControlBox]");
282Debug.Assert(formState[FormStateKeyPreview] == 0, "Failed to set formState[FormStateKeyPreview]");
283Debug.Assert(formState[FormStateLayered] == 0, "Failed to set formState[FormStateLayered]");
284Debug.Assert(formState[FormStateMaximizeBox] == 1, "Failed to set formState[FormStateMaximizeBox]");
285Debug.Assert(formState[FormStateMinimizeBox] == 1, "Failed to set formState[FormStateMinimizeBox]");
286Debug.Assert(formState[FormStateHelpButton] == 0, "Failed to set formState[FormStateHelpButton]");
287Debug.Assert(formState[FormStateStartPos] == (int)FormStartPosition.WindowsDefaultLocation, "Failed to set formState[FormStateStartPos]");
288Debug.Assert(formState[FormStateWindowState] == (int)FormWindowState.Normal, "Failed to set formState[FormStateWindowState]");
289Debug.Assert(formState[FormStateShowWindowOnCreate] == 0, "Failed to set formState[FormStateShowWindowOnCreate]");
290Debug.Assert(formState[FormStateAutoScaling] == 1, "Failed to set formState[FormStateAutoScaling]");
291Debug.Assert(formState[FormStateSetClientSize] == 0, "Failed to set formState[FormStateSetClientSize]");
292Debug.Assert(formState[FormStateTopMost] == 0, "Failed to set formState[FormStateTopMost]");
293Debug.Assert(formState[FormStateSWCalled] == 0, "Failed to set formState[FormStateSWCalled]");
294Debug.Assert(formState[FormStateMdiChildMax] == 0, "Failed to set formState[FormStateMdiChildMax]");
295Debug.Assert(formState[FormStateRenderSizeGrip] == 0, "Failed to set formState[FormStateRenderSizeGrip]");
296Debug.Assert(formState[FormStateSizeGripStyle] == 0, "Failed to set formState[FormStateSizeGripStyle]");
303Debug.Assert(formState[FormStateIsWindowActivated] == 0, "Failed to set formState[FormStateIsWindowActivated]");
304Debug.Assert(formState[FormStateIsTextEmpty] == 0, "Failed to set formState[FormStateIsTextEmpty]");
305Debug.Assert(formState[FormStateIsActive] == 0, "Failed to set formState[FormStateIsActive]");
306Debug.Assert(formState[FormStateIconSet] == 0, "Failed to set formState[FormStateIconSet]");
374return formState[FormStateIsActive] != 0;
381if ((formState[FormStateIsActive] != 0) != value) {
393formState[FormStateIsActive] = value ? 1 : 0;
396formState[FormStateIsWindowActivated] = 1;
416formState[FormStateIsWindowActivated] = 0;
524return formState[FormStateAllowTransparency] != 0;
527if (value != (formState[FormStateAllowTransparency] != 0) &&
529formState[FormStateAllowTransparency] = (value ? 1 : 0);
531formState[FormStateLayered] = formState[FormStateAllowTransparency];
566return formState[FormStateAutoScaling] != 0;
573formState[FormStateAutoScaling] = 1;
583formState[FormStateAutoScaling] = 0;
834return(FormBorderStyle)formState[FormStateBorderStyle];
871formState[FormStateBorderStyle] = (int)value;
875if (formState[FormStateSetClientSize] == 1 && !IsHandleCreated) {
897if (formState[FormStateIconSet] == 0 && !IsRestrictedWindow) {
966return formState[FormStateControlBox] != 0;
976formState[FormStateControlBox] = 1;
979formState[FormStateControlBox] = 0;
1008if (TopLevel && (formState[FormStateLayered] != 0)) {
1021if (formState[FormStateTaskBar] != 0) {
1044formState[FormStateWindowState] = (int)FormWindowState.Maximized;
1049if (formState[FormStateMdiChildMax] != 0) {
1062formState[FormStateShowWindowOnCreate] = 1;
1066formState[FormStateShowWindowOnCreate] = 0;
1258return formState[FormStateHelpButton] != 0;
1263formState[FormStateHelpButton] = 1;
1266formState[FormStateHelpButton] = 0;
1304if (formState[FormStateIconSet] == 0) {
1329formState[FormStateIconSet] = (value == null ? 0 : 1);
1358return (WindowState == FormWindowState.Maximized || (IsMdiChild && (formState[FormStateMdiChildMax] ==1)));
1446if (formState[FormStateIsRestrictedWindowChecked] == 0) {
1447formState[FormStateIsRestrictedWindow] = 0;
1466formState[FormStateIsRestrictedWindow] = 1;
1471formState[FormStateIsRestrictedWindow] = 1; // To be on the safe side
1472formState[FormStateIsRestrictedWindowChecked] = 1;
1476formState[FormStateIsRestrictedWindowChecked] = 1;
1479return formState[FormStateIsRestrictedWindow] != 0;
1497return formState[FormStateKeyPreview] != 0;
1501formState[FormStateKeyPreview] = 1;
1504formState[FormStateKeyPreview] = 0;
1710if (formState[FormStateSetClientSize] == 1 && !IsHandleCreated) {
1818return formState[FormStateMaximizeBox] != 0;
1822formState[FormStateMaximizeBox] = 1;
1825formState[FormStateMaximizeBox] = 0;
2020return formState[FormStateMinimizeBox] != 0;
2024formState[FormStateMinimizeBox] = 1;
2027formState[FormStateMinimizeBox] = 0;
2089bool oldLayered = (formState[FormStateLayered] != 0);
2094if (formState[FormStateLayered] != 1) {
2095formState[FormStateLayered] = 1;
2102formState[FormStateLayered] = (this.TransparencyKey != Color.Empty) ? 1 : 0;
2103if (oldLayered != (formState[FormStateLayered] != 0)) {
2273return formState[FormStateTaskBar] != 0;
2283formState[FormStateTaskBar] = 1;
2286formState[FormStateTaskBar] = 0;
2398return(SizeGripStyle)formState[FormStateSizeGripStyle];
2410formState[FormStateSizeGripStyle] = (int)value;
2431return(FormStartPosition)formState[FormStateStartPos];
2439formState[FormStateStartPos] = (int)value;
2567return formState[FormStateTopMost] != 0;
2582formState[FormStateTopMost] = 1;
2585formState[FormStateTopMost] = 0;
2609bool oldLayered = (formState[FormStateLayered] == 1);
2614formState[FormStateLayered] = 1;
2618formState[FormStateLayered] = (this.OpacityAsByte < 255) ? 1 : 0;
2620if (oldLayered != (formState[FormStateLayered] != 0))
2683if (0==formState[FormStateSWCalled]) {
2754return(FormWindowState)formState[FormStateWindowState];
2803formState[FormStateWindowState] = (int)value;
2817if (IsRestrictedWindow && formState[FormStateIsWindowActivated] == 1) {
2833if (IsRestrictedWindow && formState[FormStateIsWindowActivated] == 1) {
3399if ((FormWindowState)formState[FormStateWindowState] != FormWindowState.Normal
3418if (formState[FormStateSetClientSize] != 0) {
3420formState[FormStateSetClientSize] = 0;
3661&& (FormWindowState)formState[FormStateWindowState] == FormWindowState.Maximized) {
3665formState[FormStateWindowState] = (int)FormWindowState.Normal;
3666formState[FormStateMdiChildMax] = 1;
3668formState[FormStateWindowState] = (int)FormWindowState.Maximized;
3669formState[FormStateMdiChildMax] = 0;
3680if ((FormStartPosition)formState[FormStateStartPos] != FormStartPosition.WindowsDefaultBounds) {
3683if (formState[FormStateShowWindowOnCreate] == 1) {
3706if (formState[FormStateTopMost] != 0) {
3930switch ((FormBorderStyle)formState[FormStateBorderStyle]) {
3983if (formState[FormStateSetClientSize] != 0) {
3999switch ((FormStartPosition)formState[FormStateStartPos]) {
4062switch ((FormWindowState)formState[FormStateWindowState]) {
4841if (formState[FormStateAutoScaling] == 1 && !DesignMode) {
4845formState[FormStateAutoScaling] = 0;
4874FormStartPosition startPos = (FormStartPosition)formState[FormStateStartPos];
5060if (formState[FormStateRenderSizeGrip] != 0) {
5087if (formState[FormStateRenderSizeGrip] != 0) {
5245if (!ControlBox && formState[FormStateIsTextEmpty] != newTextEmpty)
5248formState[FormStateIsTextEmpty] = newTextEmpty;
5393if (formState[FormStateKeyPreview] != 0 && ProcessKeyEventArgs(ref m))
5610formState[FormStateIconSet] = 0;
5667if (formState[FormStateWindowState] == (int)FormWindowState.Minimized) {
6044formState[FormStateSetClientSize] = 1;
6271return formState[FormStateAutoScaling] != 0;
6282return formState[FormStateIconSet] == 1;
6321if (formState[FormStateWindowState] != (int)FormWindowState.Minimized) {
6354int current = formState[FormStateRenderSizeGrip];
6361formState[FormStateRenderSizeGrip] = 0;
6367formState[FormStateRenderSizeGrip] = 1;
6370formState[FormStateRenderSizeGrip] = 0;
6374formState[FormStateRenderSizeGrip] = 1;
6377formState[FormStateRenderSizeGrip] = 0;
6384if (formState[FormStateRenderSizeGrip] != current) {
6451if ((formState[FormStateLayered] != 0) && IsHandleCreated && TopLevel && OSFeature.Feature.IsPresent(OSFeature.LayeredWindows)) {
6802if ((FormBorderStyle == FormBorderStyle.FixedDialog && formState[FormStateIconSet] == 0 && !IsRestrictedWindow) || !ShowIcon) {
6856if (formState[FormStateWindowState] != (int)FormWindowState.Normal) {
6857formState[FormStateWindowState] = (int)FormWindowState.Normal;
6861if (formState[FormStateMdiChildMax] == 0) {
6862formState[FormStateWindowState] = (int)FormWindowState.Maximized;
6868if (formState[FormStateMdiChildMax] == 0) {
6869formState[FormStateWindowState] = (int)FormWindowState.Minimized;
7356if (formState[FormStateRenderSizeGrip] != 0 ) {
7400formState[FormStateSWCalled] = 1;