title: How to keep form centered to the middle of the screen after resize
body: <p>I have a form that is centered according to the screen position that I resize by fontsize when loading. After resizing the location remains the same as it was before resizing so the form is no longer in the center, like I would like.</p>
  
  <p>Let me draw you a sketch:
  <a href="https://i.stack.imgur.com/lgMZB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lgMZB.png" alt="enter image description here"></a></p>
  
  <p>I've tried calling</p>
  
  <pre><code>        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
          this.ResumeLayout(false);
          this.PerformLayout();
  </code></pre>
  
  <p>again after resizing (this is, I believe, the part of the code that centers the form in the beginning). It didn't work. I've also found some similar issues like this:
   <a href="https://stackoverflow.com/questions/3593411/keeping-winform-control-centered-after-window-resize?noredirect=1&amp;lq=1">"Keeping winform control centered after window resize
  "</a> but they always only deal with centring a control, not the form itself.</p>