to get my application to go into fullscreen mode (that is, take up the entire display, including the task bar). My main form is nothing other than a DockPanel filling the entire area, with a single form docked to it in the Document position. This form is a solid black panel, so I would expect to see an entirely black sreen once my application is in fullscreen. However, there remains a grey (likely SystemColors.Control) single-pixel border around the entire screen.
Try as I might, I cannot figure out where this 1-pixel border is coming from. I have disabled all borders I can find and changed the background color of everything else to black. Note I do not see this behavior when there is nothing docked to the DockPanel - the entire screen is then correctly a solid color. It's only when I dock a *Document* that this behavior occurs.
Any insight is appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I am struggling to remove the border from my Document when in fullscreen mode and was hoping some one could help me out.
I'm using the standard
mainForm.FormBorderStyle = FormBorderStyle.None;
mainForm.WindowState = FormWindowState.Maximized;
to get my application to go into fullscreen mode (that is, take up the entire display, including the task bar). My main form is nothing other than a DockPanel filling the entire area, with a single form docked to it in the Document position. This form is a solid black panel, so I would expect to see an entirely black sreen once my application is in fullscreen. However, there remains a grey (likely SystemColors.Control) single-pixel border around the entire screen.
Try as I might, I cannot figure out where this 1-pixel border is coming from. I have disabled all borders I can find and changed the background color of everything else to black. Note I do not see this behavior when there is nothing docked to the DockPanel - the entire screen is then correctly a solid color. It's only when I dock a *Document* that this behavior occurs.
Any insight is appreciated!
Has anyone a idea about this problem? I had the same problem.
I had solve the problem. You must uncomment the following lines in the DockWindow.cs:
public virtual Rectangle DisplayingRectangle
{
get
{
Rectangle rect = ClientRectangle;
// if DockWindow is document, exclude the border
if (DockState == DockState.Document)
{
//rect.X += 1;
//rect.Y += 1;
//rect.Width -= 2;
//rect.Height -= 2;
}
Than ist the border gone.