Question

I have a strange problem. I have designed a windows form application in c# and .net framework 3.5. In the runtime, the form and its controls are fine in all the computers except my laptop, where the controls are not in the correct positions.

If I design the form from scratch on my laptop with correct positioning it will result in an invalid shape for other computers.

My efforts:

  • If I run the windows in Safe Mode the form size and control positions are correct.
  • I have uninstalled the Video Driver and used default windows version but the problem still persists.
  • I used different frameworks like 2.0 and 4.0, and different Visual Studios versions and they all have the same problems.
  • Actually all the .net framework product from all the companies indicate the same issue.

My computer Settings: Laptop 1557 Studio DELL Graphic ATI Radeon HD 4500

Was it helpful?

Solution

When the text size is artificially increased to 125% text and controls that are rather closely placed will wrap around the form and push everything down/over. If this is something you intend to support, you'll simply have to redesign your form to handle the different enlargement levels you care to support and test those enlarged text modes in your app until you're satisfied with their appearance. It's not something you can strictly control, since increased text size is an accessibility feature.

OTHER TIPS

I assume it is due to a screen resolution differences. I believe that the actual location of the controls is identical in both cases, in one the screen is "larger" and therefor your controls appear in a different position on the screen.

try Designing forms to work on different resolutions and aspect ratios on Windows CE

Another thing you can (and should) do is work with WPF, which is the new way to build user interfaces for windows.

I've found a workaround just now. In the display settings of Windows 7 I have changed the Text size from 125% to 100%. Everything is smaller but in accurate positions and sizes. Still wondering how it works!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top