There is a program on Delphi XE8, which hangs in the notification area and, at certain events, shows a window with information. Under Windows 7, the following code provided a form showing on top of all windows by almost 100%.

with TfrmInfo.Create(self) do begin Show; Application.NormalizeTopMosts; SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE); end; 

And this code stopped working under Windows 10. More precisely, sometimes a window appears on top of all, but more often it turns out to be the other way around at the very bottom, under all windows. Can anyone come across this? And how to try to treat it?

1 answer 1

The culprit was the string with Application.NormalizeTopMosts. I did it at one time without any hesitation by some example in the code inserted. And under the seven, it at least did not interfere. But under the top ten got a problem. Just removed this line - and it all worked!

  • Accept your answer as correct. Click the check mark next to the answer. - kot-da-vinci