Manly
Manly

Reputation: 61

C#, when I maximize the form it moves to the top left

When I maximize the form, the form is positioned in the upper left and does not grow. I designed the minimize, maximize and exit buttons that I use. I set FormBorderStyle=None and FormStartPosition=CenterScreen.

To maximize the window, I used the code this.WindowState = FormWindowState.Maximized;.

I should also say that I am calling the place where the user is logged in from another form.

These are the results I got:

Normal enter image description here

Maximized enter image description here

Upvotes: 1

Views: 651

Answers (1)

Anas Abdullah Al
Anas Abdullah Al

Reputation: 241

Check if the Form MaximumSize property is set to 0,0. If not set it to 0,0 then rebuild the project and test if it's working.

enter image description here

Upvotes: 4

Related Questions