简体   繁体   中英

Controls size issues of C# windows form, looks different on compile time and different in Run Time

I have some weird problem, I am setting controls location according to requirement as well as adding new controls, but when I build project and run it, It looks totally different, all controls position location have been changed. This problem occurred when I started work on different resolution windows machine. Now if I copy this project, any windows system it looks same. I am sharing two screen shot.

This image shown, when I set the control location according my requirement. 在此处输入图片说明

this image shown status of control when I run the application. 在此处输入图片说明

I hope you will understand this problem.

Based on the picture you provided, If the winform app is developed in other computer, it is possible to occur the problem.

You could set your AutoScaleMode to Dpi to adapt the computer.

this.AutoScaleMode = AutoScaleMode.Dpi;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM