I have done a project in c# winforms. I want to set the resolution of the screen to 1680 x 1050,
when the application is run in any pc. How to do it ?
I have done a project in c# winforms. I want to set the resolution
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As the others already mentioned you shouldn’t change the resolution automatically, cause the user set it to a specific resolution he likes (or his hardware works best on).
So instead of changing the resolution you should change your application. Use TableLayoutPanel, FlowLayoutPanel and / or SplitContainer. Set the Anchor and Dock properties of your Controls and think about setting the MinimumSize and MaximumSize of each control within your application.
This way your application can automatically scale between different resolutions and the user can take the one he likes.
Last but not least, your application should not only consider to take care about the resolution the user selected, it should also take care about the selected dpi settings. Which one you should care of are described in the Windows UX Guide (site 592).