delphi package - automated exception handling


Postby Han312 » Thu Nov 28, 2019 3:42 pm

In RemoveCommandLineHeaderInfo I am trying to add additional data.

But for some reason the data which I get via screen.Monitors are wrong.
I have a 4k monitor with 150%. When I start my application
Screen.monitors[ 0 ].pixelsperinch = 144
Screen.monitors[ 0 ].width = 3840

After I create a crash the data I retrieve within of RemoveCommandLineHeaderInfo are different
Screen.monitors[ 0 ].pixelsperinch = 96
Screen.monitors[ 0 ].width = 2560

Is this a Delphi-bug? Any idea whether I can prevent it?
A workaround could be that I store the monitor data while the application is running.
Posts: 42
Joined: Mon Mar 14, 2016 3:49 pm

Re: Screen.Monitors

Postby madshi » Thu Nov 28, 2019 4:18 pm

madExcept tells the OS that it should handle high DPI setting stuff automatically. This allows the madExcept windows to be scaled up properly to the right DPI size. However, this probably affects the "Screen" functionality.

You could store the monitor while the application is running. Or alternatively, you could create a small helper thread to fetch the information. That should work, as well. I'm not sure if "Screen" is thread safe, though.
Site Admin
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Return to madExcept

Who is online

Users browsing this forum: No registered users and 8 guests