Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Form Looks Different on Another Computer

When I build my form on my machine it looks fine, but when it is compiled on a different computer the size of the form itself is wrong. Labels are moved around and things are no longer aligned properly.

How do I guarantee that everything will look the same on any computer?

I tried setting AutoScaleMode to none, and it helped a bit but then the labels were partially underneath the corresponding text boxes.

like image 699
NMunro Avatar asked Nov 19 '12 15:11

NMunro


1 Answers

Either the font or the DPI differ.

And I've never really found a way to say AutoScaleMode = (most appropriate of font or dpi).

But try AutoScaleMode = DPI and AutoScaleMode = Font. One of them should work.

We never found a reliable way to handle this. Our workplace USED to enforce the DPI on all workstations, but that has since changed. The best way to handle it is to make sure you layout your controls with FlowLayoutPanel or TableLayoutPanels instead of absolute positioning of controls.

like image 118
hometoast Avatar answered Oct 19 '22 23:10

hometoast