Delphi: Balloon Form with fsStayOnTop not working in Win7

ⅰ亾dé卋堺 提交于 2019-12-05 18:18:35

What worked for me in the past when struggling with stay-on-top forms:

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

Try this instead of your ShowWindow call. This stays on top of all windows (do you really want this?). Also it feelds kind of hacky because it omits the RestoreTopMosts call which the documentation says we should call (so other stay-on-top windows in your application will be affected). So there might be a better solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!