Reputation: 411
I am having one form, and I want that to load in the maximized state. How do I call the windows maximize event on form load?
Upvotes: 0
Views: 2018
Reputation: 8962
Just set the form's WindowsState property to maximized. Then it should start up Maximized.
Upvotes: 3
Reputation: 10410
You should set the WindowState property of the form on the load of the form. Set it to FormWindowState.Maximized
.
Upvotes: 6
Reputation: 4247
You should not call any events. Simply set the WindowState
property to maximized:
Form form = new Form();
form.WindowState = FormWindowState.Maximized;
form.ShowDialog();
Upvotes: 4