1

在 Windows 8 中,显示的所有项目的大小都发生了变化,您可以将所有内容缩放 100%-150%,有没有办法使用 C# 以编程方式更改它?

4

1 回答 1

0

I don't believe there are any API's to control this (I've looked before, but may have missed it). I know I've changed this setting on Windows 7 and it requires a logout/logon cycle. What Windows does is mess around with the device/font metrics so that your application is fooled into making the text larger on screen.

If you declare your application to be high-DPI aware, Windows will not do this for your app. You control this as you create each font instance in your application. All that windows offers is basically an option to defeat this automatic font metrics kludge on an application by application basis.

However, if you are writing Windows forms apps, you will want to look at the AutoScaleMode property as this may do what you actually want to accomplish.

于 2013-08-26T15:10:23.483 回答