tentavarious
asked on
How to resize controls based on screen resolution vb.net
I am building a vb.net application using visual studio 2003, I need the controls to resize based on the screen resolution. How can i do this? I know how to get the resolution, but is there an easy way to scale the controls to fit? Right now the application looks perfect when resolution is set to 1024 by 768, but it looks jumbled when set to 800 by 600. I am using anchors and docking to but keep them in the correct positions.
ASKER
I am using anchors and docking but my buttons, labels and user controls dont shrink to fit when I change the resolution to a smaller size.
tentavarious
You should build your forms based on the lowest possible resolution, and avoid scaling down.
Wayne
You should build your forms based on the lowest possible resolution, and avoid scaling down.
Wayne
ASKER
Well if the user increases the resolution there would be way too much space. Anchoring and docking can only do so much, I need to actually change the width/height of the controls, which I can do, but I was wondering if there was .net class that would simplify the process.
No such class I'm afraid. The only other way to resize is to handle the forms Resize event, and resize your controls in there.
Wayne
Wayne
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi tentavarious;
BTW, I have not used the product from my last post. There web site does allow you to download and try it out.
Fernando
BTW, I have not used the product from my last post. There web site does allow you to download and try it out.
Fernando
ASKER
Ok, I think i can come up with something to resize the controls upon the form loading, if it doesnt work, i will give that product a try.
Be aware that controls that display text, the font size will also need to be re-sized by using another font size.
ASKER
yep also i need to deal with a spacing issue between controls not sure how to handle that yet.
That is correct.
Anchors and Docking are the suggested methods for ensuring control/form proportions are kept.
Regards,
Wayne