Access violation when using function TScreen.MonitorFromPoint (two monitors)
Original Reporter info from Mantis: januszt29@interia.pl
-
Reporter name: Janusz Tomczak
Original Reporter info from Mantis: januszt29@interia.pl
- Reporter name: Janusz Tomczak
Description:
I'm suggests add procedure UpdateMonitors in functions TScreen.MonitorFromPoint, TScreen.MonitorFromRect and TScreen.MonitorFromWindow;
******
UpdateMonitors; <===
for i := 0 to MonitorCount - 1 do
if Monitors[i].Handle = MonitorHandle then
Exit(Monitors[i]);
******
Sometimes, when the Monitors array has changed, we need to clear and reinitialize it.