-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Borderless Krypton Form, Maximized, Top Most = True > Fullscreen does not overlap on task bar. #1037
Comments
Does a winform "Go over" the taskbar when FullScreen ?? |
Yes, borderless windows form, when maximized and set on top, goes over the taskbar. |
Might be possible to delve into the |
@Smurf-IV The property |
Found the code, WinForms repository -> // Only enforce the minimum size if the form has a border and is a top
// level form.
FormBorderStyle borderStyle = FormBorderStyle;
if (borderStyle != FormBorderStyle.None
&& borderStyle != FormBorderStyle.FixedToolWindow
&& borderStyle != FormBorderStyle.SizableToolWindow
&& ParentInternal is null)
{
Size min = SystemInformation.MinWindowTrackSize;
if (height < min.Height)
{
height = min.Height;
}
if (width < min.Width)
{
width = min.Width;
}
} |
@pgaraneta & @Smurf-IV, A lot is missing from
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
{
var updatedHeight = height;
// With the Aero glass appearance we need to reduce height by the top border,
// otherwise each time the window is maximized and restored it grows in size
if (ApplyComposition && (FormBorderStyle != FormBorderStyle.None))
{
updatedHeight = height - RealWindowBorders.Top;
}
base.SetBoundsCore(x, y, width, updatedHeight, specified);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
{
if (WindowState != FormWindowState.Normal)
{
// See RestoreWindowBoundsIfNecessary for an explanation of this
// Only restore position when x,y is not -1,-1
if (x != -1 || y != -1)
{
_restoredWindowBoundsSpecified |= (specified & (BoundsSpecified.X | BoundsSpecified.Y));
}
_restoredWindowBoundsSpecified |= (specified & (BoundsSpecified.Width | BoundsSpecified.Height));
if ((specified & BoundsSpecified.X) != 0)
{
_restoredWindowBounds.X = x;
}
if ((specified & BoundsSpecified.Y) != 0)
{
_restoredWindowBounds.Y = y;
}
if ((specified & BoundsSpecified.Width) != 0)
{
_restoredWindowBounds.Width = width;
_formStateEx[FormStateExWindowBoundsWidthIsClientSize] = 0;
}
if ((specified & BoundsSpecified.Height) != 0)
{
_restoredWindowBounds.Height = height;
_formStateEx[FormStateExWindowBoundsHeightIsClientSize] = 0;
}
}
// Update RestoreBounds
if ((specified & BoundsSpecified.X) != 0)
{
_restoreBounds.X = x;
}
if ((specified & BoundsSpecified.Y) != 0)
{
_restoreBounds.Y = y;
}
if ((specified & BoundsSpecified.Width) != 0 || _restoreBounds.Width == -1)
{
_restoreBounds.Width = width;
}
if ((specified & BoundsSpecified.Height) != 0 || _restoreBounds.Height == -1)
{
_restoreBounds.Height = height;
}
// Enforce maximum size...
if (WindowState == FormWindowState.Normal && (Height != height || Width != width))
{
Size max = SystemInformation.MaxWindowTrackSize;
if (height > max.Height)
{
height = max.Height;
}
if (width > max.Width)
{
width = max.Width;
}
}
// Only enforce the minimum size if the form has a border and is a top
// level form.
FormBorderStyle borderStyle = FormBorderStyle;
if (borderStyle != FormBorderStyle.None
&& borderStyle != FormBorderStyle.FixedToolWindow
&& borderStyle != FormBorderStyle.SizableToolWindow
&& ParentInternal is null)
{
Size min = SystemInformation.MinWindowTrackSize;
if (height < min.Height)
{
height = min.Height;
}
if (width < min.Width)
{
width = min.Width;
}
}
base.SetBoundsCore(x, y, width, height, specified);
} |
Still confused by this statement:
Because the KForm overrides, and |
- Fix a few nullables - mask the confusing warning - #Warning CS8622 Nullability of reference types in type of parameter 'sender' of 'void #1037
@Smurf-IV Using today's alpha (debug), it seems to not work anymore? |
@Wagnerp Should this be fixed and merged back into V80 ? |
@Smurf-IV If it's going to be a simple fix then yes. Trying to avoid the 'merge madness' that happened between V70 & V80 :) |
Describe the bug
In a multi screen setup, having a Borderless Krypton Form, Window state set to Maximized and Top Most = True, does not go fully full screen and does not overlap the task bar.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Borderless form, after loading should be full screen and overlap the windows task bar.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: