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.
chhakuliAsked:
Who is Participating?
 
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:
And yes, I use Visual Studio .NET 2003.
0
 
AGBrownCommented:
What are the anchor properties set to on the controls?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
chhakuliAuthor Commented:
top,left
0
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.