I have a monitoring application written in Delphi 7 that works on a part of an additional monitor. I would like it to restore itself to normal visibility if the window is minimized (for example, if I use the "Windows-D" command (view desktop) on the main monitor)
I tried this timer activated code every few seconds:
if (Mainform.WindowState <> wsNormal ) then Mainform.WindowState := wsNormal; {restore main window if minimized}
This does not work. To debug it, I changed the code to write the Mainform.WindowState value to a file as the program started. The value remains wsNormal, even if the main form window is minimized. Why?
source share