Set a form to stay on top of all other (non-topmost) windows

...
uses
Forms, Windows;
...
procedure SetTopmost(AForm: TForm; ATop: boolean);
begin

if ATop then
SetWindowPos(AForm.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE)
else
SetWindowPos(AForm.Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or
SWP_NOSIZE);
end