Answer the question
In order to leave comments, you need to log in
Why is the form not displayed on top of all windows under Windows 10?
There is a program on Delphi XE8, hanging in the notification area and showing a window with information on certain events. Under Windows 7, the following code showed the form on top of all windows 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;
Answer the question
In order to leave comments, you need to log in
The "culprit" was the line with Application.NormalizeTopMosts. At one time, without much thought, I inserted it into the code for some example. And under the seven, at least she did not interfere. But under ten I got a problem. I just removed that line and it worked!
I won’t tell you about delphi, but there is a solution for C #:
stackoverflow.com/questions/10740346/setforeground...
I use it, it works already at 99.9999% (during development it still glitched, but for several months now it has been working at 100%). I mainly work on 8.1, but there were no glitches with this method on home windows 10.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question