Open hanselb opened 8 years ago
I think the problem is in Screen.PrimaryScreen.Bounds.Width / Screen.PrimaryScreen.Bounds.Height because they return a scaled resolution.
The following change in the main method worked for me to set the DPI awareness and get unscaled values
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
[STAThread]
private static void Main()
{
SetProcessDPIAware();
If Windows 10 DPI scaling is > 100% it will not capture and report an DX error (no surface to capture)