Hi Friends,
I need to create the forms based on my User Screen resolution. It will be adjust the forms size and their controls based on the user screen.
Thanks in Advance.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhay ShankerPosted Mar 29, 2014, 10:11 PM
http://www.techrepublic.com/article/manage-winform-controls-using-the-anchor-and-dock-properties/#.
AmanPosted Mar 29, 2014, 5:31 PM
this.Width = Screen.PrimaryScreen.Bounds.Width;
this.Height = Screen.PrimaryScreen.Bounds.Height;
Above code can fill the Whole screen.
you can also use:
this.Width = Screen.PrimaryScreen.WorkingArea.Width;
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
Now you can adjust your control on the basis of form's width and height