This was raised some time back on this list. Myself and Jeremy both had
some suggestions heres Jeremys:All I did was put that code into the OnPaint Event. I.e. :-
procedure TfrmEditAccount.FormShow(Sender: TObject);
begin
SetWindowPos(Handle, HWND_TOPMOST, Self.left, self.top, 0, 0,
SWP_NOACTIVATE or SWP_NOSIZE);
end;
Also Conor suggestion may help.Also could try: {createnotowned:boolean} if CreateNotOwned then FormStyle := fsStayOnTop or if CreateNotOwned then frm := Tform.Create(nil) else frm := Tform.Create(screen.activeform); Al+ [EMAIL PROTECTED] wrote: IIRC the problem is that sometimes Windows needs to recreate your form, and forgets to set the Stay On Top info.I think the work around is something like: 1) In your form override the CreateParams procedure. 2) Set the ExStyle field of the TCreateParams parameter to include the WS_EX_TOPMOST bit. It's been years since I had to do this, but maybe a bit of Googling will help you out. HTH, Conor -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Glen Boyd I have a program that sits on top of all other windows and just displays a little info for the user. The only problem is sometimes it forgets it is meant to stay on top and nothing I seem to do will convince it otherwise. Are there any tricks out there for forcing the window to be on top of others but not have the focus? It is a standard windows 32bit program (i.e. not .net). Any pointers would be appreciated. _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi |
_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
