문제

I am developing a Winforms application, using .NET Compact Framework 3.5. The software will be used on embedded systems.

My problem is, that the layout of the form is totally different in Designer than in the actual built software.

Here is a screenshot of the form in VS 2008 Designer:

In Designer

And here is the screenshot when run the application from PC (Windows 8 64 bit):

Running the exe

As you see the gap between the two texts are way bigger than in the designer, and the designer won't allow me to move them any closer.

The red indicator is also very far away from the second text, whereas in the designer it looked just fine.

The picturebox is also not in the top-left corner of the form.

I currently don't have access to the device, that will run the software, but I want to fix this problem before I do.

What could cause the difference and how to solve it?

UPDATE 1: I have turned off AutoScaling as PaulG suggested, and turned scaling off in windows (100% instead of 125%), it is a lot closer now, but the editor and the actual program still differs noticably.

Anyway I think it is a fair guess, that the device will not have any scaling, so I am going to continue developing with these settings, as these are the most accurate.

도움이 되었습니까?

해결책

Sounds like a scaling issue

Check your designer.cs files for references to AutoScaleDimensions

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top