using Microsoft.Win32;
public static int DefaultscalingFactor = 96;
public static int scalingFactor = 0;
public static int scalingFactor = 0;
//取得目前的數值
var reg_url = "Control Panel\\Desktop\\WindowMetrics";
scalingFactor = int.Parse(Registry.CurrentUser.OpenSubKey(reg_url).GetValue("AppliedDPI").ToString());
var reg_url = "Control Panel\\Desktop\\WindowMetrics";
scalingFactor = int.Parse(Registry.CurrentUser.OpenSubKey(reg_url).GetValue("AppliedDPI").ToString());
//螢幕縮放比例
scale = scalingFactor / DefaultscalingFactor;