0
votes

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!!

3
Can you provide screen shots?Robert Harvey
Screen shots would help here. Since I think that you can't add images to a post (not enough reputation), just put the pictures online somewhere (photobucket or similar) and put the URL's in the post and someone will fix that for you.Fredrik Mörk
Provide with the screen shot <table style="width:auto;"><tr><td><a href="picasaweb.google.com.hk/lh/photo/… src="lh4.ggpht.com/_E7Tg_YxPyUQ/SixpLkQp6WI/AAAAAAAAB08/zjp2P9zMVRA/…" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="picasaweb.google.com.hk/shipchan/…> or link for the screen shot picasaweb.google.com.hk/lh/photo/…Newbee

3 Answers

0
votes

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.

0
votes

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

0
votes

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?