views:

71

answers:

3

I have a window form application (C# framework 3.5) with several textboxes, buttons and labels. When I install the application in different machines (same OS version both XP & vista), the user controls sometimes shifted down and dislocated while sometimes they come out perfectly fine....

What is the factor for the dislocation? the screen resolution? the screen size?

Is there any way to prevent this happen?

Please help!!

A: 

Check the Display Properties for each machine, by right-clicking on the desktop and selecting Properties from the menu. I think, based on your description, that it has to do with different themes/font sizes.

Robert Harvey
A: 

Also, in Display Properties, the DPI setttings can have an effet.

Cedrik
A: 

Are you ever using the Control.Size property of a Form for layout purposes? Remember that the Control.ClientSize property returns the size of the area that you can actually work in. Size includes the window decoration which can be different depending on OS settings.

Are you using a FlowLayoutPanel?

Are you familiar with how the Control.Anchor property works?

frou