windows-xp - Windows XP 中的 DPI Aware 应用程序

标签 windows-xp dpi dpi-aware

我想让我的 C# 应用程序了解 DPI。 Windows API 中有一个名为 SetProcessDPIAware() 的命令,但问题是它仅适用于 Windows Vista 和更高版本的 Windows,而不适用于 XP。如何让控件、按钮和字体 DPI 感知,以便无论使用什么 Windows 版本都能正确显示?

最佳答案

调用 SetProcessDPIAware 不仅神奇地让所有 DPI 都为您感知;它的目的是向 Windows 声明您的应用程序已正确编写为 DPI 感知。此外,不推荐使用它;您应该改为在 list 中声明 DPI 感知。有一整个 article关于这个在 MSDN 上。

关于windows-xp - Windows XP 中的 DPI Aware 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4922459/

相关文章:

c++ - 如何使我的应用程序具有 DPI 感知能力?

c++ - 双击时的文件关联问题(Windows 消息弹出)

c++ - undefined reference .. - mingw - winxp - eclipse juno

android - DisplayMetrics 返回零

python - 使用 Pillow 查找 DPI

wpf - TransformToDevice 在 Windows 8.1 上不返回正确的 DPI 系数

c - 从注册表启动程序与从启动文件夹启动的区别

batch-file - xp批处理文件中的行长度限制?

html - Retina 显示器和 1080p 手机等高 DPI 设备如何处理媒体查询中的像素?

inno-setup - Inno Setup WizardImageFile 在 Windows 7 上的字体缩放看起来很糟糕