一、背景
在PC机上显示正常,在高分辨率下的Pad上,显示出现问题:
1、显示在屏幕最右端的窗体(控件)显示不出来;
2、截图时,被截图的界面字体文字变大,界面因此显示不全。
二、解决方法:
方法一:WPF上使用WPF方式获取屏幕大小,而不是Winform的获取屏幕大小的方式。
//Size primarySize = Screen.PrimaryScreen.Bounds.Size;
double dWidth =System.Windows.SystemParameters.PrimaryScreenWidth;double dHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
View Code
方法二:Winform解决方法:
1、设置窗体的背景图片方式改为可缩放方式(Zoom): BackgroundImageLayout = ImageLayout.Zoom;
2、依据DPI扩展拷贝图片的大小,设置拷贝的图片的DPI(bmp的SetResolution方法)
BackgroundImage =GetDestopImage();
BackgroundImageLayout=ImageLayout.Zoom;priv