program Project1;
uses
Forms,
Unit1
in '
Unit1.pas'
{Form1};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := False;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
procedure FormActivate(Sender: TObject);
procedure FormShow(Sender: TObject);
protected
procedure CreateParams(
var AParams : TCreateParams);
override;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CreateParams(
var AParams: TCreateParams);
begin
inherited CreateParams(AParams);
AParams.ExStyle := AParams.ExStyle
or WS_EX_NOACTIVATE;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;
end.