title: Positioning winform to the center screen does not work
body: <p>I have an issue regarding the location of the window in my Winforms application. </p>
  
  <p>I need to position the window in the center of the screen during start up. I tried the following but that didn't work. The form always opens at the top left corner.</p>
  
  <p>I tried these in the load event:</p>
  
  <pre><code>this.CenterToScreen();
  this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
                            (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2);
  </code></pre>
  
  <p>Update: i have given the form maximum and minimum size as 1090,726.</p>
  
  <p>my designer file has this code:</p>
  
  <pre><code>        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
          this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
          this.BackColor = System.Drawing.SystemColors.GrayText;
          this.ClientSize = new System.Drawing.Size(1074, 688);
          this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
          this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
          this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
          this.MaximizeBox = false;
          this.MaximumSize = new System.Drawing.Size(1090, 726);
          this.MinimumSize = new System.Drawing.Size(1090, 726);
          this.Name = "Mail_Remainder";
          this.RightToLeftLayout = true;
          this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
          this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
          this.Text = "Remainder";
          this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
          this.Load += new System.EventHandler(this.Mail_Remainder_Load);
          this.Resize += new System.EventHandler(this.Mail_Remainder_Resize);
          this.ResumeLayout(false);
          this.PerformLayout();
  </code></pre>
  
  <p>Any other way to do this?</p>
  
  <p>Please help.</p>