I have two monitor(1:3840X2160 200% scale, 2:1280X1024 100% scale)
Then I write something to get my screen resoluton.
System.Drawing.Rectangle entireSize = System.Drawing.Rectangle.Empty;
foreach (System.Windows.Forms.Screen screen in System.Windows.Forms.Screen.AllScreens)
Console.WriteLine(screen.Bounds.Width + "," + screen.Bounds.Height);
Here comes the confuse.
TEST1: In Winfrom, I got output
1280,1024 1920,1080
TEST2: while in WPF, it shows
2560,2048 3840,2160
TSET3: check dpi Winform: 96 WPF: 192
Here is my questions:
- Why dose Winform\Wpf return different resolution/DPI?
- Obviously '2560,2048' from wpf is not correct, but why wpf return '1280X1024 * 200%'?
- How can i get a same output from both winform and wpf?