Home > DeveloperSection > Forums > Control position center on Form Maximize.
Samuel Fernandes
Samuel Fernandes

Total Post:159

Posted on    March-02-2015 6:39 AM


 2 Reply(s)
 915  View(s)
Rate this:


I am new to Windows Form application. I got into a very weird situation, I have created a Form where I have placed few controls to the center of the screen. Everything works fine when I execute the application, all control looks good and in center of the form where I had place.

Now, the issue comes when I maximize the form, control move to top left corner and not to the center of the form.

ben reitman
ben reitman

Total Post:96

Posted on    March-02-2015 6:46 AM

Write code to change the position of the control at runtime on Resize event of the form.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    March-02-2015 6:48 AM

By default every control has an Anchor property set to Left, Top that’s why your controls move to top left of the screen when maximize.

Just change the Anchor property of the control to none. 

Don't want to miss updates? Please click the below button!

Follow MindStick