Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 863
  • Last Modified:

Winforms and screen resolution

Hi,
I am working on a WinForm application in C#. I have desktop in office and laptop at home. When I design a form using my desktop (1280x1024) and compile and run, it works fine. But when I take the source code and load the solution on my laptop with different screen resolution and then try to add/move controls on the form, the form gets screwed up. When I run, the controls appear overlapping. I use a lot of user controls. When I checked the spacing between controls, it also gets reduced by the form designer. How do I handle this. I want to work on the code from both machines. Is there any way make sure that control spacings set on one machine remain same when I load the solution on another machine?

I wonder how multiple users with different machines (with different screen resolutions) working on same project, like a typical commercial project, handle this.

Any help or pointers will be appreciated.
0
chhakuli
Asked:
chhakuli
1 Solution
 
chhakuliAuthor Commented:
And yes, I use Visual Studio .NET 2003.
0
 
AGBrownCommented:
What are the anchor properties set to on the controls?
0
 
chhakuliAuthor Commented:
top,left
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AGBrownCommented:
The anchor properties are set fine afaik, so I can't help I'm afraid.

I produced a winforms piece of software for a client when I started out with .NET 1.1. It worked fine on 3 different machines that i tested it on, and as soon as I gave it to the customer he put it on his widescreen Dell, and the controls on the form were completely unable to find the right-hand side of the screen. It was a nightmare, and I couldn't find a fix for it.

I have no idea what causes this.

Andy
0
 
dunglaCommented:
Hi chhakuli,

AFAIK control spacings set on one machine remain is same when you load the solution on another machine.

How many controls do you have in form? How it look like, the position of each control and its anchor will take effect when you try to resize the form.

If you don't mind, capture your form and send to me via dungleanh@gmail.com.
0
 
RoninTheCommented:
what's the OS you're using - winxp? Is the default font size on your laptop more/less than your desktop. if yes, try changing the default theme settings like fontsize to same as your desktop(something like tahoma 8pt). it might help.
0
 
chhakuliAuthor Commented:
Thanks RoninThe. My desktop font was set to Large. I changed it to small (as is on my laptop) and now it works fine. no overlapping issue.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now