WindowState Maximized Causes Controls to Change Size

Hi All!
I have been trying to get my customized dashboard to open up maximized. I just found this little setting for the MainController WindowState.
Capture43
It had been set to Normal. When I change it to Maximized, some of my labels and grids changed in size and shape, causing all kinds of things to overlap and fall off the screen. When I manually click the maximize button, this does not happen.

Is this a known bug? Should it be? Is there a more reliable way to set the screen to Maximized automatically? I would like to achieve this without a Personalization.

Thank you for your time!
Nate

Good timing… Look at

Edit

At first I thought maybe setting the property was messing things up and that setting the window state by code would fix it.

But after giving it some thought, you might just be seeing a common bug that moves controls around (although I’ve never seen it change the size of them). What do yo see if you select Tools → Reset Layouts to Base, after it loads. Do things go back to normal?

1 Like

This worked. I ended up using this little nugget:

	private void MainController_Load(object sender, EventArgs args)
	{
		MainController.WindowState = FormWindowState.Maximized;
	}
1 Like

No, that didn’t fix it. But the custom code did. Thanks!
:slight_smile:

I always use the code… Because the other one seems to run in _Shown instead _Load so if you have alot of Controls using Epicors Toolbox value, you will notice lag! Repainting etc…

I always stick to code.

1 Like