.Net controls changing size between computers

前端 未结 3 1815
闹比i
闹比i 2021-01-03 03:54

I have a wierd problem that i need to work out how to resolve,

I have spent the last couple of weeks working on a project for work on my laptop, but when I open the

3条回答
  •  悲&欢浪女
    2021-01-03 04:29

    The video adapter in your workstation has a different dots-per-inch setting. The form automatically rescales itself to accommodate that.

    This is going to happen as well when you ship your product and it will run on the client's machine. Changing the form's AutoScaleMode property is not a fix, that will just produce clipped text in the controls. Make sure you form design is resilient to layout changes. Dock, Anchor, TableLayoutPanel, FlowLayoutPanel, the Resize event for tough cases. And make sure the controls inherit their container's Font property (not bold in the Properties window)

提交回复
热议问题