Chris, if we got this to work then it would be the answer to all my problems
but at the moment something weird is happening.
I compiled it just as you have outlined below and it didn't seem to do
anything so I closed the app and reran and it worked, everytime I clicked on
something else it would reactivate the form however I have recompiled again
and again and now it does nothing which is really strange is there some
other message that could be arriving at different times that would override
this depending on speed of machine?
I am compiling on NT so thought it could be an NT prob so ran the app on my
win98 machine but no go there either.
Thanks for your help,
Matt.
----- Original Message -----
From: Chris Crowe <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, July 27, 1999 7:38 AM
Subject: RE: [DUG]: Deativation.
> try
>
> unit Unit1;
>
> interface
>
> uses
> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs;
>
> type
> TForm1 = class(TForm)
> private
> { Private declarations }
> public
> { Public declarations }
> procedure KillFocus(var message : TWMKillFocus); message WM_KILLFOCUS;
> end;
>
> var
> Form1: TForm1;
>
> implementation
>
> {$R *.DFM}
>
>
> procedure TForm1.KillFocus(var message : TWMKillFocus);
> begin
> SetActiveWindow(Handle);
> end;
>
>
> end.
>
> It sort of works quite well, but I think you do loose focus for a split
> second.
>
> chris
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Matthew Comb
> Sent: Monday, July 26, 1999 4:38 PM
> To: Multiple recipients of list delphi
> Subject: [DUG]: Deativation.
>
>
> Is it possible to make it IMpossible to deativate an application. I
> basically want to be able to run an app that as well as staying to the
> front, can not lose focus by the user clicking on other applications.
>
> Is there a way I can override some windows messages to achieve this?
>
> Cheers,
>
> Matt.
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz