Delphi: Ball shape with fsStayOnTop not working in Win7

I have an application that uses my own ball shape. This is a non-bound form of the form fsStayOnTop.

I will show it with this code:

ShowWindow(Handle, SW_SHOWNOACTIVATE);
Visible := True;

Today I realized that if I activate another application, then the balloon will not appear! So this will lose it in the upper style.

Environment: Win7 / x64 Delphi 6 Professional

What can I do about it?

Thanks: dd

+3
source share
1 answer

What worked for me in the past when struggling with forms of staying on top:

Form := TMyForm.Create(Self);
Application.NormalizeTopMosts;
SetWindowPos(Form.Handle, HWND_TOPMOST, 0, 0, 0, 0,
             SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE);
Form.Show;

ShowWindow. ( ?). , , RestoreTopMosts, , ( ). , .

+4

Source: https://habr.com/ru/post/1737297/


All Articles