spell checker

This commit is contained in:
donlaci
2024-08-06 17:13:20 +02:00
parent f80eaf7b23
commit ef511d6318

View File

@@ -41,9 +41,9 @@ namespace ProjectsEditor.Utils
internal static double GetScreenDpiFromScreen(Screen screen)
{
var pnt = new System.Drawing.Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1);
var mon = NativeMethods.MonitorFromPoint(pnt, 2/*MONITOR_DEFAULTTONEAREST*/);
NativeMethods.GetDpiForMonitor(mon, NativeMethods.DpiType.EFFECTIVE, out uint dpiX, out uint dpiY);
var point = new System.Drawing.Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1);
var monitor = NativeMethods.MonitorFromPoint(point, 2/*MONITOR_DEFAULTTONEAREST*/);
NativeMethods.GetDpiForMonitor(monitor, NativeMethods.DpiType.EFFECTIVE, out uint dpiX, out uint dpiY);
return dpiX / 96.0;
}
}