hide the form

I'd like to hide the form,while keeping it's objects appear,such as images,pannels ..etc.
 
  How can I do so ?
I prefer a way doesn't depend on a component.
alim_mazeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hubdogCommented:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
  private
    { Private declarations }
    procedure HideForm(var Msg:TMessage);message wm_eraseBkGnd;
    procedure Createparams(var Params:TCreateParams);override;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.HideForm(var Msg: TMessage);
begin

  msg.result:=1;
end;

procedure TForm1.Createparams(var Params: TCreateParams);
begin
  inherited;
  with params do
  begin
    exstyle:=exstyle or WS_EX_TRANSPARENT;
    style:=style and (not WS_CLIPCHILDREN);
  end;
end;

end.
if your want the form without border and caption, you can set the form.borderstyle:=bsnone;

good luck

hubdog
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ptmcompCommented:
Does it really work? I think I had to put a UpdateWindow(0) before msg.result=1. But perhaps I'm wrong.
0
anasexpertCommented:
hi everybody
 Yes Hubdog's way works well.
thank's for you Hubdog.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.