I need to get the desktop resolution from a Delphi program.
However, if the program is not DPI aware Windows will lie about the real screen resolution so all kind of problems will rise from here.
Since it is too much work to make the program fully DPI aware (and I try to AVOID the WMI solution) I am thinking using a quick dirty trick: I will create a microscopic DPI-aware console program that will read the real resolution.
The main program will use start this little program (hidden) every time it needs the resolution. Seems simple enough to do. Right?
Question 1: Do I have another (better) option?
Question 2: I tried to create that little program. Although is has something like 10 lines of code its EXE size is 2.1MB and its memory footprint is 5.4MB!
Can I make it smaller? If the program is small enough (under 1MB RAM) I could leave it run all the time without pissing off the users.