«« Site Rescued »»

While the site is still going to move from its current host, a new site will now take its place. More Info.

The new site may have less content, but the core will now remain. And it will now play nicely with phones! Keep an eye on the DelphiDabbler Blog for news.

» Help

How to have a form that never activates

   

Things like the start menu, on screen keyboard etc. seem to float on top of everything, but never get focused. Use CreateParams to make the form non focusable.

type
  TForm1 = class(TForm)
  private
    { Private declarations }
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  public
    { Public declarations }
  end;

procedure TForm1.CreateParams(var Params: TCreateParams);
const
  WS_EX_NOACTIVATE = $8000000;
begin
  inherited;
  Params.ExStyle := Params.ExStyle + WS_EX_NOACTIVATE;
end;
Author: logman0u812
Added: 2007-06-02
Last updated: 2007-06-02

« Return to contents »