I currently use a VMware virtual machine (Windows XP) to debug my .NET WinForms applications under 120dpi. Very annoying.
我目前使用VMware虚拟机(Windows XP)在120dpi下调试我的.NET WinForms应用程序。很烦人。
Does anybody know a way that gives me similar results under my 96dpi working environment? That is, can 120dpi mode be activated for a single process, or is there a switch in Windows Forms?
有没有人知道在我的96dpi工作环境下给我类似结果的方法?也就是说,可以为单个进程激活120dpi模式,还是在Windows Forms中有一个开关?
1 个解决方案
#1
You can use Form Font property. By default WinForm form scale itself when Font property changed, something like that:
您可以使用Form Font属性。默认情况下,当Font属性发生变化时,WinForm表单会自动缩放,类似于:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Font = new Font("Arial", 14);
}
Don't forget to read about AutoScaleMode property and in general about autoscaling in MSDN.
不要忘记阅读有关AutoScaleMode属性的信息,以及有关MSDN中自动缩放的一般信息。
#1
You can use Form Font property. By default WinForm form scale itself when Font property changed, something like that:
您可以使用Form Font属性。默认情况下,当Font属性发生变化时,WinForm表单会自动缩放,类似于:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Font = new Font("Arial", 14);
}
Don't forget to read about AutoScaleMode property and in general about autoscaling in MSDN.
不要忘记阅读有关AutoScaleMode属性的信息,以及有关MSDN中自动缩放的一般信息。