title: Full screen Windows Form goes beyond screen dimensions
body: <p>I have a WinForms app (.NET 4) that needs to be shown either full screen or maximized without borders.</p>
  
  <p>Using the following code in the <code>Form_Shown</code> event:</p>
  
  <pre><code>#if (DEBUG)
      var debug = true;
  #else
      var debug = false;
  #endif
  
  this.Text = "";
  this.ControlBox = false;
  this.ShowInTaskbar = true;
  //this.TopMost = debug;
  this.TopLevel = true;
  this.FormBorderStyle = FormBorderStyle.None;
  
  if (debug) { this.Bounds = Screen.FromControl(this).WorkingArea; }
  else { this.WindowState = FormWindowState.Maximized; }
  </code></pre>
  
  <p>If you look closely at the screenshot below, the top and bottom areas are cut off by a few pixels. Also, if maximized, the window still does not cover the task bar.</p>
  
  <p>Please note that I have only one monitor attached. No secondary displays.</p>
  
  <p>Any suggestions on how to address the two issues above would be appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/fuk06.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fuk06.png" alt="Screenshot of app in maximized mode"></a></p>
  
  <p><strong>UPDATE:</strong> The code above seems to work fine with forms without a <code>MenuStrip</code> or <code>StatusStrip</code>.</p>