2008. március 26., szerda

Form as Application


Problem/Question/Abstract:

How i can create a form and this form stay in another icon in task bar ? (Looks like a new aplication).

Answer:

In private clause:

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

And, in the implementation:

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  with params do
    ExStyle := ExStyle or WS_EX_APPWINDOW;
end;

Nincsenek megjegyzések:

Megjegyzés küldése