Search results for 'Hide Caption Bar'. 1 post(s) found.

  1. 2007/08/25 How can I hide the caption bar on a form?
2007/08/25 09:48

How can I hide the caption bar on a form?


To hide the Caption Bar you need to override on of the default form methods CreateParams (this also exists for other objects).

The CreateParams method initializes a window-creation parameter record passed in the Params parameter (ref:Delphi Help).

Go to the protected/public section on the form and override the CreateParams method by typing the following:

procedure CreateParams(var Params: TCreateParams); override;


Within the unit type the following for the CreateParams method.

procedure TForm1.CreateParams(var Params: TCreateParams);

begin

inherited CreatePArams (Params);

with Params do

style := (Style or WS_POPUP) and (not WS_DLGFRAME);

end;

unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.CreateParams(var Params:  TCreateParams);
begin
     inherited CreatePArams (Params);
     with Params do
       style := (Style or WS_POPUP) and (not WS_DLGFRAME);
end;

end.

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 04:33 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 13:14 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:38 delete

    moneyideas