It doesn't work inthe
The form isn't bringged to top
I try your code and add
setforegroundwindow(handle
BringWindowToTop(handle);
but no way
Why did you prefer procedure WMActivate( Var msg: TWMActivate );
instead of Procedure ToujoursActif(var Msg :TMessage);
to work only with WM_activate message ??
Main Topics
Browse All Topics





by: inthePosted on 2002-04-28 at 09:17:43ID: 6975097
hi,
use TWMActivate mesage instead,declare it like this:
private
{ Private declarations }
procedure WMActivate( Var msg: TWMActivate );
message WM_ACTIVATE;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WMActivate( Var msg: TWMActivate );
begin
If msg.Active = WA_INACTIVE Then
PostMessage(handle, WM_ACTIVATE, WA_ACTIVE,0);
inherited;
end;
the above will only make the window active and not nessesarily at the top though,so maybe you may want to add setforegroundwindow etc as well.