Well, nice approach
, but "conceptually wrong"
A modern LCD monitor - unlike good ol' CRT ones has one (and one only) "native resolution".
Any other resolution but the native one will be "worse" than the "native" one.
See as an example the output of Dumpedid:
http://www.nirsoft.n.../dump_edid.htmlC:\appoggio>DumpEDID.exe
DumpEDID v1.05
Copyright (c) 2006 - 2015 Nir Sofer
Web site: http://www.nirsoft.net
*****************************************************************
Active : Yes
Registry Key : DISPLAY\ACI22A2\5&2eaf1468&0&11335578&04&00
Monitor Name : VW222
Serial Number : 82LMQS015086
Manufacture Week : 7 / 2008
ManufacturerID : 26884 (0x6904)
ProductID : 8866 (0x22A2)
Serial Number (Numeric) : 16843009 (0x01010101)
EDID Version : 1.3
Display Gamma : 2.20
Vertical Frequency : 56 - 75 Hz
Horizontal Frequency : 31 - 81 KHz
Maximum Image Size : 47 X 30 cm (22.0 Inch)
Maximum Resolution : 1680 X 1050
Support Standby Mode : Yes
Support Suspend Mode : Yes
Support Low-Power Mode : Yes
Support Default GTF : No
Digital : No
Supported Display Modes :
720 X 400 70 Hz
640 X 480 60 Hz
640 X 480 67 Hz
640 X 480 72 Hz
640 X 480 75 Hz
800 X 600 56 Hz
800 X 600 60 Hz
800 X 600 72 Hz
800 X 600 75 Hz
832 X 624 75 Hz
1024 X 768 60 Hz
1024 X 768 70 Hz
1024 X 768 75 Hz
1152 X 864 75 Hz
1280 X 960 60 Hz
1440 X 900 60 Hz
1280 X 1024 60 Hz
1280 X 1024 75 Hz
1680 X 1050 60 Hz
1600 X 1200 60 Hz
*****************************************************************
The "correct" resolution is the:
Maximum Resolution : 1680 X 1050
Your algorithm - if I get it right - would have instead chosen 1600x1200=1920000>1680x1050=1764000
The above little thingy by Nirsoft has some provisions to detect the "Detailed Timing Descriptor" and should be as accurate as possible, compare with:
https://en.wikipedia...tive_resolutionhttps://en.wikipedia...tification_Datahttps://en.wikipedia...ata#LimitationsBTW (and as a side note) I am not at all convinced (but I may well be wrong) that the Qres.exe that has a /L option actually comes from:
https://sourceforge.net/projects/qres/(by Berent Engelbrecht)
but rather is the:
QRes v1.1
Copyright © Anders Kjersem
http://www.softpedia...ools/QRes.shtmlI would use the newer Dumpedid to check "native" resolution and then use Qres to set it.
Wonko